Comparison Operators

Comparison Operators

Comparison Operators

= (Equals)

The equality operator returns Boolean true if both operands are the same (type and value). Arrays and objects are checked for deep equality. Arrays must have the same values in the same order. Objects must have the same key/value pairs (order is not relevant). Otherwise it returns false.

Examples

  • 1+1 = 2 => true
  • "Hello" = "World" => false

!= (Not equals)

The inequality operator returns Boolean false if both operands are the same (type and value, deep equality). Otherwise it returns true.

Examples

  • 1+1 != 3 => true
  • "Hello" != "World" => true

> (Greater than)

The 'greater than' operator returns Boolean true if the LHS is numerically greater than the RHS. Otherwise it returns false.

Examples

  • 22 / 7 > 3 => true
  • 5 > 5 => false

< (Less than)

The 'less than' operator returns Boolean true if the LHS is numerically less than the RHS. Otherwise it returns false.

Examples

  • 22 / 7 < 3 => false
  • 5 < 5 => false

>= (Greater than or equals)

The 'greater than or equals' operator returns Boolean true if the LHS is numerically greater than or equal to the RHS. Otherwise it returns false.

Examples

  • 22 / 7 >= 3 => true
  • 5 >= 5 => true

<= (Less than or equals)

The 'less than or equals' operator returns Boolean true if the LHS is numerically less than or equal to the RHS. Otherwise it returns false.

Examples

  • 22 / 7 <= 3 => false
  • 5 <= 5 => true

in (Inclusion)

The array (sequence) inclusion operator returns Boolean true if the value of the LHS is included in the array of values on the RHS. Otherwise it returns false. If the RHS is a single value, then it is treated as a singleton array.

Examples

  • "world" in ["hello", "world"] => true
  • "hello" in "hello" => true
  • library.books["Aho" in authors].title

    • Related Articles

    • Boolean Operators

      Boolean Operators and (Boolean AND) The 'and' operator returns Boolean true if both operands evaluate to true. If either or both operands is not a Boolean type, then they are first cast to a Boolean using the rules of the $boolean function. Example ...
    • Numeric Operators

      Numeric Operators + (Addition) The addition operator adds the operands to produce the numerical sum. It is an error if either operand is not a number. Example 5 + 2 => 7 - (Subtraction/Negation) The subtraction operator subtracts the RHS value from ...
    • Path Operators

      Path Operators Fuuz Context Where this applies in Fuuz: Path operators drive how Fuuz Pipelines traverse inbound payloads and build outbound messages. They are central to mapping data from PLC/MES/ERP sources into normalized objects before publishing ...
    • Other Operators

      Other Operators Fuuz Context Where this applies in Fuuz: These operators are frequently used in Fuuz Mappings and Rules to craft strings, bind variables, chain functions, and define transforms that keep payloads consistent across steps. Concatenation ...
    • Expressions

      Manipulating data with functions and expressions Fuuz Context Where this applies in Fuuz: JSONata-style expressions are used in Fuuz Data Pipelines, Mappings, and Rule Engines to transform payloads between MES/ERP endpoints, GraphQL resolvers, and ...