Best Way to Parse JSON

Hi all,

I'm looking for a way to parse the JSON that I'm receiving from a MQTT communication.
I'm receiving the following structure:

IOLM/port/1/pdi : msg.payload : string[163]
"{"port":1,"valid":1,"uint":8716289,"PD_ProcessData_IN":{ "Flow":133,"Error":false,"Fixed_output":false,"HHH_LLL":false,"OUT2":false,"OUT1":true},"raw":[0,133,0,1]}"

However, I would like to look only into the Flow information, such as:
Flow:133

Thank you guys
Regards
Marcos

Hi @smarcos212

Configure the MQTT node to output a parsed JSON object. That will do all the work for you.

You will then be able to access msg.payload.PD_ProcessData_IN.Flow to access the value you mention.

2 Likes

As @knolleary mentioned
caapture

1 Like

Thank you guys, it worked perfectly!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.