extracting array from object of an object code example
Example 1: javascript extract array from object
var obj = {v1: 'v1', v2: 'v2'};
// extract object's values as array
var valuesArray = Object.values(obj); // ['v1','v2']
Example 2: extract value from array of objects javascript
let result = objArray.map(a => a.foo);