how to reduce value array to one string code example
Example 1: js reduce a array of straing
var authors = [{name: 'some author'},{name: 'another author'},{name: 'last author'}]
var authorString = authors.map(function(author){
return author.name;
}).join(",");
console.log(authorString);
Example 2: js reduce a array of straing
var authors = ['some author', 'another author', 'last author'];
var authorString = authors.join(",");
console.log(authorString);