I am trying to implement a logic that, i want to push some objects into the array after a specic index like, In a array have 5 objects then , i want to push two new objects after 3 index in current array. How can i do it.
const currarr = [{id:1,name:"abc"},{id:2,name:"efg"},{id:3,name:"hij"},{id:4,name:"klm"},{id:5,name:"nop"}];
otherObj = [{id:6,name:"fdf"},{id:7,name:"gfg"}]
I want to push the two new objects of otherObj array into the currarr array after the 3 index.