i have the below response from server:
{"result":{"js":"memo","text":"some value","tag":"some tag"}}
in the client side (using jquery), i am parsing this as below:
var obj = JSON.parse(resp);
i have a variable defined as below:
var prop = $(this).attr('pId'); -> returns “text”
i am looking for something like using this variable prop with the json object as follow:
obj.result.prop : obj.result.text = i am expecting “some value” to be obtained
is there a specific way to get a value like above?
Use bracket notation.