I have tried to search the solution alot but no one really helped me.
I have a javascript object:
trucks_obj
= Object {95: _.Kd, 96: _.Kd}
95: _.Kd
96: _.Kd
__proto__: Object
If the if condition is true, I just want to remove element from trucks_obj with specific ID. e.g. I need to remove element with 95 index. I have already tried splice() as well as slice() but nothing worked.
Deletion Code:
$.each(trucks_obj,function(i,e){
if(($.inArray(i, trucks_arr)) === -1){
trucks_obj.splice(i,1);
}
});