Convert MQTT payload

From TTN MQTT I read the output of a Dragino LDS02 door/window contact. If I understand correctly that is called a string output (image), am I correct? To process it further I want to split that, I think this is called an object.

I don't know how to convert such a string into an object, does anyone have a tip?

1 Like

Have you tried using the JSON node in the "parser" group. It converts between a JSON string and its JavaScript object representation, in either direction.

1 Like

If you, like me, are alone in front of the computer, you sometimes keep going round in circles without finding the answer. Even if the solution is simple, I would not have found it so quickly.

I'm glad I could consult this forum and get help so quickly. Thanks for helping!

Even better is to select Parsed JSON output in the mqtt node then it will parse the JSON for you.

Thanks Colin.

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