I have a multidimensional array is :-
serialNos = [{id:'12',serial:'DAS245'},{id:'13',serial:'DAS246'},{id:'15',serial:'DAS247'}]
the ids and serials are random and i use push function to push them inside the array as i get those.
serialNos.push({id:'16',serial:'DAS248'});
Now, the thing is at times I have to remove elements from this array but all i get is serial not the id i.e., DAS248. How do I delete it in easy steps? I dont want to go thru iteration method as it takes too much memory and is not efficient. Also I want to restore order i mean indexes of serialNos in ascending order without any gaps.
NOTE : ids and serials both are unique
Platform : Javascript