I have a JSON passed to script. I do not know JSON keys as they are dynamic.
Actually, they are numbers. That's what I'm getting.
var countries = {"223":"142,143","222":"23,26,25,24","170":"1,2"};
I tried to access data like this:
var objKey = 223; (var objKey = "223";) countries.objKey;
I tried changing JSON to
var countries = {"country223":"142,143","country222":"23,26,25,24","country170":"1,2"};
... and access it like this:
var objKey = "country"+223; (var objKey = "country"+"223";) countries.objKey;
... again nothing.
Any advice would be greatly appreciated.