Boolean Functions

Boolean Functions

Article Type: How-To Audience: Developers, App Admins Module: How To

Standard JSONata Boolean functions available in expressions throughout the Fuuz platform.

$boolean()

Signature: $boolean(arg)

Casts the argument to a Boolean using the following rules:

Argument type Result
Boolean unchanged
string: empty false
string: non-empty true
number: 0 false
number: non-zero true
null false
array: empty false
array: contains a member that casts to true true
array: all members cast to false false
object: empty false
object: non-empty true
function false

$not()

Signature: $not(arg)

Returns Boolean NOT on the argument. arg is first cast to a Boolean.

$exists()

Signature: $exists(arg)

Returns Boolean true if the arg expression evaluates to a value, or false if the expression does not match anything (e.g. a path to a non-existent field reference).

See Also

    • Related Articles

    • Boolean Operators

      Article Type: How-To Audience: Developers, App Admins Module: How To Standard JSONata Boolean operators available in expressions throughout the Fuuz platform. and (Boolean AND) The and operator returns Boolean true if both operands evaluate to true. ...
    • Aggregation Functions

      Article Type: How-To Audience: Developers, App Admins Module: How To Numeric aggregation functions available in JSONata expressions throughout the Fuuz platform. $sum() Signature: $sum(array) Returns the arithmetic sum of an array of numbers. It is ...
    • Numeric Functions

      Numeric functions $number() Signature: $number(arg) Casts the arg parameter to a number using the following casting rules - Numbers are unchanged - Strings that contain a sequence of characters that represent a legal JSON number are converted to that ...
    • Object Functions

      Object functions Fuuz Context Where this applies in Fuuz: Object utilities help normalize heterogeneous payloads from connectors, merge partial updates, and emit well-formed objects to Fuuz topics. $keys/$lookup: Discover and retrieve fields across ...
    • Array Functions (Standard JSONata)

      Article Type: How-To Audience: Developers, App Admins Module: How To Standard JSONata array functions available in expressions throughout the Fuuz platform. Note: This page covers the standard JSONata array functions. For Fuuz-specific custom ...