Can please someone help me with this.
In an automation, I have a variable named sqlanswer filled with a very short json formatted SQL server reply.
The reply might be: {'result': [{'onlyrfid': 0}]}
Now I need an if-then to check if this variable contains a simple substring, in this case “onlyrfid”. No need to parse any JSON.
For the hell of it I could not find a proper syntax. I was going with:
You guys where absolutely right, I was not dealing with a simple string. | string conversion did exactly what I needed, but I also see now the power in having much more than just a string already at hand.