Using jQuery inArray with array of JavaScript Objects
n
is your list item, so something like this should do the job:
$.grep(issuesArray, function(n) { return n.ID != "2"; })
Not sure if I understood your question correctly, but I would do:
$.each(IssuesArray, function(i, item){
if (item.ID == IDToBeRemoved) IssuesArray.splice(i, 1);
});
var spliceID = function(id, arr) {
$(arr).each(function(i, el) {
if (el.ID == id) {
arr.splice(i,1);
return false;
}
});
return arr;
}
console.log(spliceID('2', IssuesArray));