JSON object:
{
"data": {
"myStatus": "[1 2 21 0 50 0 0 0],[2 1 3 1 50 0 0 0]"
},
"success": true
}
Upon converting to the JSON object, it appears that the myStatus is being treated as a string. The goal is to parse it as an Array instead.
Typically, the JSON object should look like this:
var jsonObj= JSON.parse(<abovestring>);
jsonObj.data.myStatus[0] => [1 2 21 0 50 0 0 0];
jsonObj.data.myStatus[0][0] => 1
jsonObj.data.myStatus[0][1] => 2
jsonObj.data.myStatus[0][2] => 21
Is there a way to split it in the required format?