var tz = {"US": [123, 456, 784], "UK": [456, 461, 953]};
An I get country code from web page's form.
e.g.
var countryCode = $('#country option:selected').val(); // Now "countryCode" is UK
Now I want to get the array data of "UK". e.g. [456, 461, 953]
How can I write the code? Thanks.
tzdoes not contain JSON data. It is a normal object literal. It is only JSON if it is a string (and only contains valid data types of course).