I have an array of objects such as Id:1, Name:Greg
Now I need to remove the object with an Id of 5.
I just need the existing array with the item removed, not a new array.
I don't want to use an external library to do this.
(The suggested duplicate answer is for deleting a number of objects at once, which is not what I want to do.)
What I would like to do is call
remove(theArray, theObject);
and it would remove it from the array.