Filter for Payload message

Hi,
i need some help to filter only the "illuminance_lux":xxx value.

the message that i receive looks like this:

payload: "illuminance":20935,"illuminance_lux":123,"linkquality":0,"battery":100,"voltage":3100}"

and i only need the value "123" for example. How can i extract this value

thanks in advance

Felix

If you go to the debug tab in the sidebar you can copy the path to an object property with the first of the three icons that are next to it


Than you can use this copied path in a change node

Johannes

No, the payload is full of other values like this

Your payload is a json string representation of a javascript object than. Simply feed it through the json node from the palette first and it will be parsed to a nice javascript object where you can use the above method.
Where is that value coming from? If its from an mqtt node you can actually select in the mqtt in node to parse the value and emit it already transformed to a nice workable js object.

I`ll try that ...

Thx... it´s solved !

1 Like

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