Hi, I need help figuring out how to iterate through an array of objects.
Below is my original json data:
[
{
"1960": 54211,
"1961": 55438,
"1962": 56225,
...
"2019": 106314,
"CountryName": "Aruba",
"CountryCode": "ABW"
},
{
"1960": 8996973,
"1961": 9169410,
"1962": 9351441,
...
"2019": 38041754,
"CountryName": "Afghanistan",
"CountryCode": "AFG"
},
{
"1960": 5454933,
"1961": 5531472,
"1962": 5608539,
...
"2019": 31825295,
"CountryName": "Angola",
"CountryCode": "AGO"
},
...
{
"1960": 92418,
"1961": 100796,
"1962": 112118,
...
"2019": 9770529,
"CountryName": "Zimbabwe",
"CountryCode": "ZMB"
}
]
I want to know how to group date given a couple of parameters for example:
- An array of CountryNames eg:
["Aruba", "Angola", "USA"]
- and also a range of Min and Max Years eg:
[1968, 2000]
So how can I create sub set object from that information?
Any help or pointers will be much appreciated.