Perform .join on value in array of objects Perform .join on value in array of objects arrays arrays

Perform .join on value in array of objects


If you want to map objects to something (in this case a property). I think Array.prototype.map is what you're looking for if you want to code functionally.

console.log([      {name: "Joe", age: 22},      {name: "Kevin", age: 24},      {name: "Peter", age: 21}    ].map(function(elem){        return elem.name;    }).join(","));