This is a part from my json file
{
"articles": [
{
"rank": "1",
"title": "Harvard University",
"country": "USA",
"score": "100.00"
},
{
"rank": "3",
"title": "Massachusetts Institute of Technology",
"country": "USA",
"score": "97.12"
},
{
"rank": "5",
"title": "University of Oxford",
"country": "United Kingdom",
"score": "95.39"
},
{
"rank": "36",
"title": "École Polytechnique",
"country": "France",
"score": "59.09",
},
{
"rank": "904",
"title": "University of Basilicata",
"country": "Italy",
"score": "44.31",
}
]
}
I want to count the number of same countries with JS function for making google charts. I need a result like this:
country:{"USA" : 57,"Japan" : 23,"United Kingdom" : 38,"
And another function which will return the number of univercities whose scores are more than 80 and less than 80 , like this:
score:{"morethan80" : 195,"lessthan80" : 805,"