Here is how one conventionally gets a value from a json object:
var random_json_string = "{ "name": "YOLO"}";
var value = JSON.parse(random_json_string);
var key = value.name; // key is now "YOLO"
But I want to do this :
var keyTitle = "name";
var random_json_string = "{ "name": "YOLO"}";
var value = JSON.parse(random_json_string);
var key = value.keyTitle; // I cannot do this because the code tries to search the json object for a child with the name ketTitle instead of searching for the child with the name : "name"
Notice on the last line I want to search for the key with the name that is defined by the var keyTitle.
How do we do this?