javascript map object aray 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
const numbers = [0,1,2,3];
console.log(numbers.map((number) => {
return number;
}));