Enhance the main array by adding the second and third arrays as properties
var main = [{
'id': 1,
//'second':[
// {'something':'here'},
//{'something':'here 2'}
// ],
/*'thrid' : [
{'something':'here too '},
{'something':'here too 2'}
]
*/
}]
var second[{
'something': 'here'
}, {
'something': 'here 2'
}]
var thrid[{
'something': 'here too '
}, {
'something': 'here too 2'
}]
Another query: I am developing a single-page application, should I implement this on the backend or frontend for better performance?