I have an object like this:
var person = { name: \"John\", surname: \"Smith\", phone: \"253 689 4555\" }
I want:
var arr = [ { key_1: "A", key_2: "1" }, { key_1: "B", key_2: "2" }, { key_1: "C", key_2: "3" } ]; var CSVOf_arr = arr.map((item) => { return item.key_1 }).join(',') console.log('Comma seprated values of arr', CSVOf_arr)
OUTPUT: A,B,C