javascript loop through array using map code example
Example: typescript map list to new list of objects
var result = arr.map(person => ({ value: person.id, text: person.name }));
console.log(result)
var result = arr.map(person => ({ value: person.id, text: person.name }));
console.log(result)