I have a json array stored in a url like
http://localhost/heart/api/restApiController/dataset.json
Json array looks like this
[
{
Weight: "3",
Smoking: "1",
Exercising: "0",
Food_habits: "0",
Parents_HA: "1",
Alcohol: "2",
Occupation: "1",
Working_hours: "4",
Heart_Attack: "0"
}, {
Weight: "4",
Smoking: "0",
Exercising: "1",
Food_habits: "0",
Parents_HA: "1",
Alcohol: "1",
Occupation: "1",
Working_hours: "2",
Heart_Attack: "0"
}, {
Weight: "2",
Smoking: "1",
Exercising: "1",
Food_habits: "0",
Parents_HA: "1",
Alcohol: "2",
Occupation: "1",
Working_hours: "4",
Heart_Attack: "0"
}
]
I want to count the number of objects in this array and how many objects are there which has Heart_attack:'0' value. How can I do this?