DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
convert array of string to array of objects javascript
myArray = myArray.map((str, index) => ({ value: str, id: index + 1 }));
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#convert
#array
#string
#array
#objects
#javascript
ADD COMMENT
Topic
COMMENT
Name
6+7 =
Submit