json – Node-Red: Parse JavaScript Object with Double value

I am using node-RED to call in data from a robot. In the debug window it says it is a ‘msg: Object’, and when I copy it to a notepad it takes the format: {“topic”:””,”payload”:27.659992218017578,”_session”:{“type”:”tcp”,”id”:”0151ff7339437ec6″},”_msgid”:”6a6897605a523366″}

I am also not sure if this is a JSON object or not, as I see examples with ” around the brackets.

I am trying to use the function node within node-red to parse this to attain the “payload” value. However, it keeps returning as undefined.

I am using the script:

var json =msg.payload;
var obj = JSON.parse(json);