mirror of
https://github.com/n8n-io/n8n-docs.git
synced 2026-03-28 09:58:43 +07:00
438 B
438 B
$evaluateExpression(expression: string, itemIndex: number)
Evaluates a given string as expression.
If no itemIndex is provided it uses by default in the Function-Node the data of item 0 and
in the Function Item-Node the data of the current item.
Example:
items[0].json.variable1 = $evaluateExpression('{{1+2}}');
items[0].json.variable2 = $evaluateExpression($node["Set"].json["myExpression"], 1);
return items;