Tried to push new key and value but not working.Here given my code. Do not use {'id5':5} Because i am not trying to push object 1. Trying inside object 0
Demo: https://stackblitz.com/edit/js-1guupk
items = [{
'id1': 1,
'id2': 2,
'id3': 3,
'id4': 4
}];
items.push('id5': 5);
console.log(items);
Output should be:
console.log(items);
0: Object
id1: 1
id2: 2
id3: 3
id4: 4
id5: 5