Skip to main content

Manipulating data with functions and expressions

String expressions

Path expressions that point to a string value will return that value.

String literals can also be created by enclosing the sequence of characters in quotes. Either double quotes " or single quotes ' can be used, provided the same quote type is used for the start and end of the string literal. Single quote characters may be included within a double quoted string and vice versa withought escaping. Characters within the string literal may be escaped using the same format as JSON strings.

Strings can be combined using the concatenation operator &. This is an infix operator and will join the two strings returned by the expressions either side of it. This is the only operator that will attempt to typecast its operands to the expected (string) type.

Numeric expressions

Path expressions that point to a number value will return that value.

Numeric literals can also be created using the same syntax as JSON numbers.

Numbers can be combined using the usual mathematical operators to produce a resulting number. Supported operators:

  • + addition
  • - subtraction
  • * multiplication
  • / division
  • % remainder (modulo)

Comparison expressions

Often used in predicates, for comparison of two values. Returns Boolean true or false. Supported operators:

  • = equals
  • != not equals
  • < less than
  • <= less than or equal
  • > greater than
  • >= greater than or equal
  • in value is contained in an array

Boolean expressions

Used to combine Boolean results, often to support more sophisticated predicate expressions. Supported operators:

  • and
  • or

Note that not is supported as a function, not an operator.