Help parsing a json file (Urgent)

I am a beginner with node red. I am receiving from The Thing Stack quite a complex JSON string over MQTT. I am only interested in a very small subset of the JSON payload received.
What is the best way to extract the "decode_payload", and all its data (I mean "decoded_payload":{"analog_in_0":4.21,"analog_in_1":5.22,"digital_in_0":1}) in the long JSON below.

Thanks a lot for your help,

I am stuck.



Hi Marc, as a newbe to node-red i will list out some resources. No more than an hour or so reading / watching & you should be flying...


This post should help to clarify the difference between Javascript objects and JSON.


There’s a great page in the docs that will explain how to use the debug panel to find the right path to any data item.

Pay particular attention to the part about the buttons that appear under your mouse pointer when you over hover a debug message property in the sidebar.


And last but not least

I recommend watching this playlist: Node-RED Essentials. The videos are done by the developers of node-red. They're nice & short and to the point. You will understand a whole lot more in about 1 hour. A small investment for a lot of gain.

Quick version...

A JSON string can be converted to an object where you can use the buttons in the debug window (as demos in the GIF above)

Often (like in the MQTT) node, you can set the MQTT node settings to parse the JSON into an object (meaning you dont need the JSON node).

Hope that helps.

And one more which describes how, for the future, to post flows or code so that the forum does not mess up the format: How to share code or flow json

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