I have a JSON object as below:
{"_id":"594fe31b3e158c0e70c9bb3e","deviceid":"342","alldata":"{\"deviceid\":\"342\",\"voltage\":\"14\",\"current\":\"9\",\"power\":\"92\",\"status\":\"1\"}","receivedon":"2017/06/25 21:51:47","__v":0}
The issue is that, when I try to output obj.alldata.voltage, it just gives blank; which leads me to think that obj.alldata is a string and not a JSON object.
When I print obj.alldata, it gives an output like:
{"deviceid":"342","voltage":"14","current":"9","power":"92","status":"1"}
How can I use obj.receivedon, as well as obj.alldata.voltage, correctly?