I have an Object like this:
{ \"index\": 0, \"name\": \"b1a042ff6-0c75-4af2-a9da-1a16f333baee_p0\", \"category\": \"others\", \"rawUrl\": \"https://fireb
The docs explain
The unshift() method adds one or more elements to the beginning of an array and returns the new length of the array.
unshift()
Maybe instead of assigning the result of unshift, do
unshift
const newClonedArray = JSON.parse(JSON.stringify(array)); newClonedArray.unshift(object);