Payload message object key with a space?

Payload message object key with a space? Got a python script that sends MQTT data and one of the keys in the resulting JavaScript object (via JSON) has spaces in the key string.

So, "System Up TIme: XXXXX" versus "SystemUpTime: XXXXX" for example. Space are legit apparently in key names, and JavaScript objects, but how does one qualify such in a change node?

msg.payload.System Up Time
msg.payload."System Up Time"
msg.payload["System Up Time"]

None of the above work?

Apparently you can do msg.payload["System Up Time"] in a functional node.

In a Change node, assuming you have set it to msg type, you can enter payload["System Up Time"]

You use [copy path] button from the debug sidebar then paste it into the change node textbox


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