Array.prototype.remove = fucntion(obj) { for(var i in this) { if(typeof this[i] == "object") { var flag = true; for(var attr in this[i]){ if(this[i][attr] != obj[attr]){ flag = false; break; } } if(flag) { this.splice(i,1); } } else { if(this[i] == obj) { this.splice(i,1); } } } }