I want to get the length of an array that match the value specified by the condition.
var school = {
student : {
name: Json,
class: 0,
type: male,
average: B+
},
student : {
name: Afrado,
class: 0,
type: male,
average: C+
},
student : {
name: Emily,
class: 1,
type: female,
average: A+
}
};
I'd like to know the lengh of class "0"
but I don't know how to resolve this case?
In this case I can get the length of "2" for my results.
Have a nice day~ :)