MQTT JSON Data in json input

Hello

I am new to Node-Red and am experiencing with it. Now i am trying to dim and switch hue lights over the MQTT protocol with hassio. My app sends the following data to MQTT/Node-Red {"mqtt_dashboard":{"color":"#8E8E8E","brightness":36}}

Now i have it setup to convert this to a real JSON item in Node-Red and that works. My question is how can i extract for example brightness and how can i use it as a "variable" in another element 'my light'

The documentation might help (including the video)

It is important in IT to get the terminology correct, otherwise people will get confused about what you mean. A JSON object is always a string, I imagine what you mean is that you have converted the JSON string that comes in from MQTT into a Javascript object. If you had to use a JSON node to do that then you might have been able instead to use the option in the MQTT node to parse the data as JSON and convert it to an object. That is the Output option Parsed JSON Object.

Yeah i know. But, when i am new to a programming language or programming related software it is always confusing. Btw thank you for your reaction it has been solved successfully.

No criticism was intended, just clarifying the terminology.

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