There is a JSON string in a JSON object
{
"abc": "{\n \"_count\": 10,\n \"_start\": 0,\n \"_total\": 60\n }",
"success": true
}
I want to get the the the value of abc as JSON object in javascript.
There is a JSON string in a JSON object
{
"abc": "{\n \"_count\": 10,\n \"_start\": 0,\n \"_total\": 60\n }",
"success": true
}
I want to get the the the value of abc as JSON object in javascript.
If your object is in a variable called obj then obj.abc will return the string value. As this is a JSON string encoding a JavaScript object you need to use JSON.parse to convert it : var abc = JSON.parse (obj.abc);. You now have access to the field vaues abc._count, abc._start and abc._total.