How to detect empty string in a structure

Hello,

I'm getting data from a PLC and I get a strucutre like below :

{"signal":"MsgAppro_UK28","path":"DB58,STRING134..63","error":0,"value":[""]}

With the function "Switch", I test with the "Empty" or "Not Empty" comparison and I got always a value (with debug function) with the "Not empty" output. But the string is really empty but I think, the function detect the "".
In the switch function, the payload is msg.payload.value
Have you got a solution for that?

Thanks a lot,

value is an array with 1 element that happens to be empty string (so value is not an empty string)

You should read the "working with messages" documentation. It shows you how to copy the correct path from a debug message.

Well worth spending 10mins to absorb it (will save you having to ask here)

1 Like