as the title states, by removing certain items from the Object
, the index
sequence
get's disorganized.
Let's say you have this Object:
var oObject = {
0:{"Name0":"Example0", "Number":13},
1:{"Name1":"Example1", "Number":13},
2:{"Name2":"Example2", "Number":13},
3:{"Name3":"Example3", "Number":13},
4:{"Name4":"Example4", "Number":13}
}
By removing [3] Index
, with delete oObject[3]
you get the following Object
:
var oObject = {
0:{"Name0":"Example0", "Number":13},
1:{"Name1":"Example1", "Number":13},
2:{"Name2":"Example2", "Number":13},
4:{"Name4":"Example4", "Number":13}
}
as you can see oObject-Indexes
got disorganized.
Question: Is there an operation that can delete
entries
from Objects
and keep it clean in terms of indexes
?