Something like this should do it. If you pass the array of objects as the first arg and the key you are looking for as the second it should return the number of elements in the array that possess such a key, as in :
var quantity = checkKey(YourArray, 'A');
function checkKey(Arr, key){
var number = 0;
var i, len = Arr.length;
for(i = 0; i < len; i++){
if(Arr[i][key]){
number++;
}
return number;
}
Bookmarks