Duaer

Expressions and code

Object transformation methods in Duaer

In a Duaer expression, object methods test fields, drop fields, merge objects, and encode an object as a query string.

Methods

  • keys() returns the field names. values() returns the values.
  • hasField(name) says whether that field exists (top-level only, case-sensitive).
  • isEmpty() and isNotEmpty() treat an object with no fields as empty.
  • compact() drops fields whose values are empty.
  • removeField(name) removes one field.
  • keepFieldsContaining(text) and removeFieldsContaining(text) keep or drop fields whose names contain that text.
  • merge(other) merges another object. The other object wins on a shared field name.
  • toJsonString() returns a JSON string.
  • urlEncode() encodes the object as a URL query string.
{{ $json.address.hasField("city") }}

Questions

What does hasField test in Duaer?

In a Duaer expression, whether that field exists (top-level only, case-sensitive). keys() returns field names; values() returns the values.

Which value wins on merge in Duaer when both objects share a field?

In a Duaer expression, merge(other) combines the objects. On a shared field name, the other object’s value wins.

In this section