add index to array of object in js 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);