say I have an array
var test = [{a: 26, b:14, c:null},{d:67, e: 8}];
say I want the value of c, I don't know what value c will have or which array will have c;
I was thinking of using $.grep but it does seem like I could use it in that way
So how do I go about getting the value of c?
EDIT
Just test as per my comment you can do
$.grep(test,function(e){return e.hasOwnProperty('c')})
This will return the array that has the object/objects of the property you want
test.filter(function(x){return "c" in x}).map(function(x){return x.c}).forEach(alert)- or, with jQuery,$.each($.map($.grep(test, function(x){return "c" in x}), function(x){return x.c}), alert)