Splice is effective:
var arr = [{id:1,name:'serdar'}];
arr.splice(0,1);
// []
Arrays should not be deleted using the delete operator.
delete does not remove an entry from an Array; instead, it replaces it with undefined.
var arr = [0,1,2];
delete arr[1];
// [0, undefined, 2]
But perhaps you'd like something like this?
var removeByAttr = function(arr, attr, value){
var i = arr.length;
while(i--){
if( arr[i]
&& arr[i].hasOwnProperty(attr)
&& (arguments.length > 2 && arr[i][attr] === value ) ){
arr.splice(i,1);
}
}
return arr;
}