If you cannot modify the structure of that data (which basically means turning it into an ECMAscript Array), you could hack around it a bit. Basically you could turn the Object into an ECMAscript Array.
obj.length = Object.keys( obj ).length;
obj.splice = [].splice;
Now you could treat it like an ordinary Array
obj.splice(1,1);
This would remove the element at position 1
. You would need to restore the integrity of that object by removing the .length
and .splice
properties.
delete obj.length;
delete obj.splice;
That is probably not the most elegant solution, but it will do the job.