I have an array of object and I'm looking to remove an element. However, the splice method seems to return the element removed, not the array without the element I wanted to remove.
This is what I have
var TheArray = TheObject.Array;
TheArray = TheArray.splice(TheIndex, 1); //TheIndex is the index of the element I want to remove
TheObject.Array = TheArrray;
When I debug and run this code, TheObject.Array contains the element I wanted to remove.
What am I doing wrong? Thanks for your suggestions.