Json with hyphen

I have an object coming from MQTT, inside the Json there is some hyphen and I'm not able to read it.
I cannot understand where is my error.

[{"id":"6d828b17.342db4","type":"inject","z":"3c5213a5.c4284c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"StatusSNS\":{\"Time\":\"2020-08-11T06:08:13\",\"Switch2\":\"OFF\",\"BME280-76\":{\"Temperature\":25.1,\"Humidity\":56.9,\"DewPoint\":15.9,\"Pressure\":1003.5},\"BMP180-77\":{\"Temperature\":25.6,\"Pressure\":1006.9},\"PressureUnit\":\"hPa\",\"TempUnit\":\"C\"}}","payloadType":"json","x":280,"y":400,"wires":[["331405.e11e5bfc","267db1b0.6d05ee","34380528.ba27fa"]]},{"id":"331405.e11e5bfc","type":"debug","z":"3c5213a5.c4284c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":730,"y":400,"wires":[]},{"id":"267db1b0.6d05ee","type":"change","z":"3c5213a5.c4284c","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.StatusSNS.Switch2","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":500,"y":440,"wires":[["331405.e11e5bfc"]]},{"id":"34380528.ba27fa","type":"change","z":"3c5213a5.c4284c","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.StatusSNS[\"BME280-76\"].Temperature","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":500,"y":480,"wires":[["331405.e11e5bfc"]]}]

Any help is welcome.

Thanks.
Max

Set the change node to msg., not expression.

1 Like

Thanks bakman2!

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