Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
TypeScript
typescript map list to new list of objects
hasib chowdhury
Programming language:
TypeScript
2021-04-10 15:18:29
0
Q:
typescript map list to new list of objects
Oleg Bavaev
Code:
TypeScript
2021-09-17 11:39:34
var result = arr.map(person => ({ value: person.id, text: person.name })); console.log(result)
4
Tags
object
new
list
map
objects
script
Related
array of objects create common key as a property and create array of objects
typescript loop over map with value as array
use map with filter in react components from arrays of data
typescript map array
typescript create map
New to Communities?
Join the community