Need Help With HTTP connection to an API

Homunculus

Member
Well this looks like a JSON file, you should be able to read everything using json_decode and reading a couple of values from the resulting ds_map
 

FrostyCat

Member
This isn't difficult at all once you learn how to work down a JSON hierarchy. Here the path is just "Meta Data" > "6. Time Zone".

Assuming that you already have it decoded to json_data, this is all you need:
Code:
var metadata = json_data[? "Meta Data"];
var timezone = metadata[? "6. Time Zone"];
Or if you have the utility script from this post, it's a one-liner:
Code:
var timezone = json_get(json_data, "Meta Data", "6. Time Zone");
 
Top