how to take a value from array and set it as a propery of an object code example
Example 1: array objects to array of one property
let result = objArray.map(a => a.foo);
Example 2: map a property from array of objects javascript
var result = objArray.map(function(a) {return a.foo;});