I am accessing a key from json object but it returns undefined
{"body":"Hi","date":"2016-07-29 07:43:00"}
var a = JSON.parse(JSON.stringify(r.txt));
console.log(a.body)
//undefined
value of r is
{
username: '1',
txt: '{"body":"Hi","date":"2016-07-29 07:43:00"}',
}
I have tried using stringify and then parse to json but still return undefined.