Skip to content

AT&T Flow Designer - Best way to extract a JSON msg.payload

Best way to extract a JSON msg.payload
09.07.2017 02:28 PM
I am extracting a stream values from a M2X node pumping it into a JSON node and then pumping it into DEBUG node, here is the msg.payload:

9/7/2017, 4:24:35 PMnode: 92e9439f.ddb1emsg.payload : string[557]"{"raw":"{\"limit\":1000,\"end\":\"2017-09-07T21:24:35.058Z\",\"sort\":\"timestamp\",\"sort_dir\":\"desc\",\"values\":[{\"timestamp\":\"2017-09-01T05:01:00.000Z\",\"value\":80.0},{\"timestamp\":\"2017-09-01T05:00:00.000Z\",\"value\":70.0},{\"timestamp\":\"2017-08-11T20:00:00.000Z\",\"value\":1.0}]}","headers":{"content-type":"application/json; charset=UTF-8","x-m2x-version":"v2.112.2","vary":"Accept-Encoding","x-ratelimit-limit":"50","x-ratelimit-remaining":"49","x-ratelimit-reset":"1504819476","connection":"close","content-length":"256"},"status":200}"

I want to extract a row at a time, thinking a Javascript function node is the best answer ?