I have a json data like this in jQuery
{"res":"123","pgm":"bar","digit":"demo"}
Now I have to alert the res
and pgm
.
How i retrieve these two from the json data
Thanks
I have a json data like this in jQuery
{"res":"123","pgm":"bar","digit":"demo"}
Now I have to alert the res
and pgm
.
How i retrieve these two from the json data
Thanks
Do it like:
var data = {"res":"123","pgm":"bar","digit":"demo"};
alert(data.res);
alert(data.pgm);
var json = {"res":"123","pgm":"bar","digit":"demo"};
alert(json.res+" - "+json.pgm);