add id for each index in the array javascript code example
Example: add an object to index 0 array js
//Add an object to start of array
splice(index,noOfItemstoDelete,item);
ex - arr.splice(0,0,item);
//Add an object to start of array
splice(index,noOfItemstoDelete,item);
ex - arr.splice(0,0,item);