javascript - how to add array into array's and as its property -
add second , third array main's array properties
var main = [{ 'id': 1, //'second':[ // {'something':'here'}, //{'something':'here 2'} // ], /*'thrid' : [ {'something':'here '}, {'something':'here 2'} ] */ }] var second[{ 'something': 'here' }, { 'something': 'here 2' }] var thrid[{ 'something': 'here ' }, { 'something': 'here 2' }]
one more question, i'm building single page application, should @ or front end better?
just add them -
var second = [{ 'something': 'here' }, { 'something': 'here 2' }] main['second'] = second;
for more help-
Comments
Post a Comment