If I have an array of strings, I can use the .join() method to get a single string, with each element separated by commas, like so:
.join()
[\"Joe\", \"
lets say the objects array is referenced by the variable users
users
If ES6 can be used then the easiest solution will be:
users.map(user => user.name).join(', ');
If not, and lodash can be used so :
_.map(users, function(user) { return user.name; }).join(', ');