Expressions and code
Use 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.
How to call a method in Duaer
Set the parameter to Expression, then put a dot and the method after the field or literal. The method changes the expression result. It does not rewrite the original item on the previous node unless you write the result into a new field.
When the work is only transformation, put the expressions in Edit Fields (Set). In the Code node, use JavaScript or Luxon’s own methods.
{{ $json.email.extractEmail() }}The six groups
Questions
Where do you write a Duaer transformation method?
In a Duaer expression, after the value—for example {{ $json.email.extractEmail() }}. The parameter must be in Expression mode. These extensions are not in the Code node.
How are Duaer transformation methods grouped?
In Duaer, as arrays, booleans, dates, numbers, objects, and strings. Date math needs a Luxon DateTime—$now already is one; a string uses toDateTime().
In this section
String transformation methods in Duaer
In a Duaer expression, string methods change case, slice text, test emails and URLs, and encode or decode base64 and URLs.
TransformArray transformation methods in Duaer
In a Duaer expression, call an array method on the array, such as {{ $json.ids.unique() }}. average, max, and min throw if any element is not a number.
TransformDate transformation methods in Duaer
In a Duaer expression, $now and $today are Luxon DateTime values. Call toDateTime() on a string or number before format, plus, or setZone.