Hi everyone,
Excuse me I'm a beginner in programming languages and NODE-REDHow can I convert the message received from the MQTT block to Boolean?
Hi everyone,
Excuse me I'm a beginner in programming languages and NODE-REDHow can I convert the message received from the MQTT block to Boolean?
The debug output payload looks like valid JSON so either connect a JSON node between the MQTT and debug node OR set the mqtt node to convert JSON to object.
Then, you can access msg.data
and msg.ispublic
and they will/are Boolean. No conversation required.
Great!!!!!!!!!!!
Thank you Steve.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.