i want to load one value from a json into a var in an extjs app. The json output looks like this
{"rechten":[{"name":"baas"}]}
If i want to use it in a store i know what to do but i use that only for grids before. I want a var like this
var rechten = "baas";
so i can check this into something else:
if(rechten == "baas") { alert('je bent de baas') }
else { alert('helaas je bent arbeider')};
so my question is how can i check the name value from that json in this if else statement?
1 Answer