store values in a new array using map function code example
Example 1: typescript map list to new list of objects
var result = arr.map(person => ({ value: person.id, text: person.name }));
console.log(result)
Example 2: javascript map over new array
// With ES6, you can do this:
[...Array(10)].map((a, b) => a)