js, return the keys when mapping an array of objects 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)