Expressions and code
Methods and variables reference for Duaer
Names used most often in a Duaer expression: the current item is $json, an earlier node is $("Node name"), variables are $vars, and transformation methods are grouped by data type.
Reading data
- $json.field is a field on the current item.
- $binary is the file on the current item.
- $("Node name").item, .first(), .last(), and .all() are the linked item, the first item, the last item, or every item from that node.
- $itemIndex and $runIndex are this item’s position and how many times this node has run. Both start at 0.
- $vars.key reads Define custom variables in Duaer.
- $execution.id and $workflow.name are this execution and this workflow.
- $pageCount, $request, and $response exist only in HTTP Request pagination. See Use HTTP node pagination variables.
Conditions and transformations
- $if(condition, a, b) and $ifEmpty(value, default) choose a value or fill a default.
- $now, $today, and toDateTime() are dates. See Work with dates using Luxon in Duaer.
- $jmespath(object, "query") is in Query JSON with JMESPath in Duaer.
- Methods for strings, arrays, numbers, objects, booleans, and dates are in Use data transformation methods.
Questions
What reads the current item and an earlier node in Duaer?
In a Duaer expression, the current item is $json and its file is $binary. An earlier node is $("Node name").item, first(), last(), or all(). A reusable variable is $vars.key.
Is $pageCount a general variable in Duaer?
No. In Duaer, $pageCount, $request, and $response exist only in HTTP Request pagination. Other nodes still read the current item with $json.
In this section
Use convenience methods in Duaer expressions
In a Duaer expression, use $json for the current item, $("Node name") for an earlier node, and $now and $if() for time and conditions.
TransformUse data transformation methods in Duaer
In a Duaer expression, call a transformation method on a value, such as {{ $json.name.toTitleCase() }}. Methods are grouped by array, boolean, date, number, object, and string.
VariablesDefine custom variables in Duaer
Custom variables let you store and reuse values across Duaer workflows.