JSONata: to payload or not to payload

Hi,

I may be missing something (probably) but I think there is some inconsistency in the way the JSONata Expression Editor works as opposed to the way expressions must be formatted in the node.

In the test tab of the editor I cannot use a leading payload, but in the actual node I must use the leading payload.

for example if I put payload.with.content.incident.name into the node it works fine, but if I use that in the editor test tab it fails.

But if I remove the payload and just put with.content.incident.name it works fine in the test tab but fails in the node.

Thanks

Bruce

Hi @broo0ose

in the expression test tab, where you provide the test data, you are providing the full message object, not just the payload.

{
   "payload": { "a": 1 }
}

yes that's the problem.

Thanks

Bruce