Hello,
When using array functions like find or filter, I get an “invalid syntax” message, when I use it in
an expession:
Strangely, I still get the correct output, just the erroneous message.
Kind regards,
Jos
Hello,
When using array functions like find or filter, I get an “invalid syntax” message, when I use it in
an expession:
Strangely, I still get the correct output, just the erroneous message.
Kind regards,
Jos
Can you let us know the following to see if we can reproduce this?
Would you also be able to share a workflow with us that we can reproduce this in that would not require any external credentials?
Hi @Jos_van_Uden, I am afraid expressions in n8n will use a template engine which doesn’t fully support fat arrow functions. So your best bet would be to use this function in a Code node (and then use a subsequent IF node to filter based on the result produced in the Code node).
There was a discussion around moving to a more capable library at some point, though I am not fully sure what the outcome was and if there are any plans to change this. @ivov, do you know more on this topic?
Work is underway to replace riot-tmpl
with a new ES6-compatible lib written by the team.
Hello,
Thanks for the responses. I noticed in the documentation that I can’t use arrow functions (yet).
I guess I could use $jmespath.
Kind regards,
Jos
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.