DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
array of numbers to array of objects
var data = values.map(function(el, i) { return { x: i, value: el } });
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#array
#numbers
#array
#objects
ADD COMMENT
Topic
COMMENT
Name
9+4 =
Submit