Extract data from an MQTT payload


Hi all,

I am a newbie and tried to connect with an MQTT broker to the TTN network and to extract data from my nodes in the TTN network. In the next step I want to put this data into an influx db. There are two sensors on this board which measures temperature, pressure and humidity. One is on the top (top) and the other on the bottom (bot). How can I extract these two pairs (temp, pressure, humidity) from both sensors ?
Here is my msg object:


  • "top":{"humi":32,"pres":976.4,"temp":17.9}},*

Many thanks in advance !



If it has come from MQTT it's most likely to be a String type - and you really need it as JSON so pass it through a JSON node to format it up - then read this https://nodered.org/docs/user-guide/messages which should help you understand how to extract the pieces you want from that object (probably) using a change node.

Don't hesitate to come back when you get stuck.



I will try !
Thanks so far for your help.
Br Peter