I have a JSON object with a list of countries :
"countries": {
"AQ": {"name": "Antarctica", n: 0, current: 1},
"AF": {"name": "Afghanistan", n: 2, current: 1},
"AL": {"name": "Albania", n: 3, current: 1},
}
load >>
countriesDB = json.datas.countries
I need to get the n and the current of an item. countriesDB.AQ.n works, of course. But the caller is from another db ; events[0].e[0] gives me "AQ". So what I'd like to do is something like that : countriesDB.(events[0].e[0]).n.
This is certainly pretty simple but I cannot figure out how to.