Remove [] from an output

Hello, I am trying to remove the brackets [] at the output of my payload

If I get "27" or "25" it gives me a text result, but the problem is that the sensor reading gives me ["27.500"]

How can I remove those []?

Thank you

I have tried with a change function


You are receiving a json string representation of an array. You can select in the mqtt node to automatically parse this to a javascript object.

Once you have done this you can copy the path to the element in the array from the debug sidebar and use this path in a change node to set your payload to that element.

Perfect, it worked for me the first time.

Many thanks

1 Like

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