Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js create jaon object from for loop

var loop = [];

for(var x = 0; x < 10; x++){
 loop.push({value1: "value_a_" + x , value2: "value_b_" + x});
}

JSON.stringify({array: loop});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #create #jaon #object #loop
ADD COMMENT
Topic
Name
4+1 =