Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

typescript map list to new list of objects

var result = arr.map(person => ({ value: person.id, text: person.name }));
console.log(result)
 
PREVIOUS NEXT
Tagged: #typescript #map #list #list #objects
ADD COMMENT
Topic
Name
7+9 =