Search
 
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
Name
9+4 =