I have an array of objects like so:
var myArray = [
{field: \'id\', operator: \'eq\', value: id},
{field: \'cStatus\', operator: \'eq\', value: cSta
Here's another option using jQuery grep. Pass true
as the third parameter to ensure grep removes items that match your function.
users = $.grep(users, function(el, idx) {return el.field == "money"}, true)
If you're already using jQuery then no shim is required, which is could be useful as opposed to using Array.filter
.