I need a little help with navigating a json file.
I'm looking to get all the country names from a return like this:
[{"country":
{
"225":["United Kingdom","Europe"],
"206":["Switzerland","Europe"],
"176":["Romania","Europe"],
"127":["Madagascar","AMEA"],
"217":["Tunisia","AMEA"]
}
}]
How would I get to this when I don't know or have a list of the 225, 206...etc?
if you have a key (e.g.
225), thenarr[0]["country"]["225"]returns an array with["United Kingdom","Europe"]if you want to obtain a list of keys (and respective values) just use