I have a workflow which gets as input equality/inequality expressions which i want to act based upon. I wish to evaluate the value of the expression inside the ‘if’ node and act accordingly. I have seen that theres a utility function $evaluteExpression - but it does not work when i attempt to evalute the whole expression as a string.
For example:
“if {{ $evaluteExpression(1==0) }}” will result in
“if false”
however, the following expression:
“if {{ $evaluteExpression(“1==0” }}” (notice the quotes) will result in
“if 1==0”
my expression is injected from a input parameter, therefore its necessarily a string.
I understand this is probably possible using the code block, but i would very much like to avoid it. Does anyone else have an idea?
- n8n version: 1.86.0
- Database: postgresdb