function findAndRemove(array, property, value) { $.each(array, function(index, result) { if(result[property] == value) { //Remove from array array.splice(index, 1); } }); } //Checks countries.result for an object with a property of 'id' whose value is 'AF' //Then removes it ;p findAndRemove(countries.results, 'id', 'AF');
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)