Duaer

Expressions and code

Boolean transformation methods in Duaer

In a Duaer expression, a boolean can be tested for empty and converted to a number or a string. true becomes 1 as a number; false becomes 0.

Methods

  • isEmpty() returns true for false, null, or undefined, and false for true. It is not only a missing-field check.
  • isNotEmpty() is the inverse of isEmpty().
  • toNumber() turns true into 1 and false into 0.
  • toString() turns the boolean into the string true or false.
{{ $json.active.toNumber() }}

Questions

What does toNumber return in a Duaer expression?

In a Duaer expression, true becomes 1 and false becomes 0. toString() becomes the string true or false.

Does Duaer isEmpty treat false as empty?

Yes. In a Duaer expression, isEmpty() on a boolean returns true for false, null, or undefined, and false for true. It is not only a missing-field check.

In this section