javascript map to array and back code example
Example 1: map a property from array of objects javascript
var result = objArray.map(function(a) {return a.foo;});
Example 2: javascript map over new array
// With ES6, you can do this:
[...Array(10)].map((a, b) => a)