Hi @ljpaff
the JSONata expression option in the Switch node is evaluated against the message it receives - regardless of what you set in the top 'property' box. This means you cannot point it at a context value and evaluate an expression against it. That is slightly surprising to me - I would have expected the JSONata expression to be evaluated against whatever you set in the top property box... I'll have a look to see if we can correct that - although would need to be careful not to change behaviour that people may rely on.
For your scenario, it doesn't matter what you put in the property
box, but you can use the following expression:
$globalContext('presencia.abraham') = 'Casa' or $globalContext('presencia.hellem') = 'Casa'
- the single
=
is correct for a JSONata expression - your value is stored under the context name of
presencia
- so you need to include that in the key passed to$globalContext