Message Payload build-up

Hi All,

I'm a bit puzzled.
I've got a device which sends a MQTT message stream. Some values are sent as an object with a value f.i. "temp": 23.2, "hum": 66.6, "Speed status": 44,
when debugging the single values i got stuck on the message "Speed status":44 I cannot view this in the debug window because of the space between Speed and status. How can i solve this?
msg.payload.Speed status does not work because of the space.


Hi @ieddev, welcome to the forum.

As you say, msg.payload.Speed status will not work but the alternative format msg.payload["Speed status"] should be OK.

1 Like

I used msg.payload.["Speed status"] but now i see i was wrong. after losing the dot between payload and [" it works.



Node-red haa built in tools to help you like the copy path button.

There’s a great page in the docs (Working with messages : Node-RED) 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.


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