javascript loop through array of objects and change values code example
Example: js loop over array of objects extract value
var myArr = [{name: 'rich', secondName: 'james'}, {name: 'brian', secondName: 'chris'}];
var mySecondArr = myArr.map(x => x.name);
console.log(mySecondArr);