I have this data
var game = [
{
'userType' : 'VIP',
'data' : [{
'name' : 'John'
}]
},
{'userType' : 'VIP',
'data' : [{
'name' : 'Michelle'
}]
}];
var newArr = { isActive: true };
I've tried to do this
game.push.apply(game[0], newArr);
And there's no newArr
when i did the console log
Am I missing something here?
How to append newArr
to the first array of game? (game[0])
Thanks guys