Is it possible to use a variable to fetch a JSON object? Here is an example of what I’m trying to do:
var test = "json_category";
alert(json.test);
I don’t have the option to do json.json_category so that’s not an option. I need to use the variable to represent the string. I’m just not sure how to do this.
You’re trying to write