[-1]
retrieves the last item in an array)
$string
is a JSONata
function)$number
is a JSONata
function)/
s with -
in a string/
s with -
in in a string (using ~>
operator)[]
is required at the end of an expression to convert the result to an
array.~>
operator~>
operator$map
, $sum
and ~>
operator to add up all values in an array$
is a variable (e.g. $streetName := address.street
). A variable can be one of any type in JSONata’s type system.
$
– the variable with no name refers to the context value at any point in the input JSON hierarchy.$$
– the root of the input JSON. You can use it to break out of the current context and navigate down a different path.$
variable$$
variable for every item while looping over an array$variableName := value
is how assigns value
to a JSONata $variableName
variable()
yyyy/MM/dd
format to DD/MM/YYYY
yyyy/MM/dd
formatyyyy/MM/dd
format to DD-MM-YYYY
America/New_York
timezone$$
selector.
$$
selector.
$substring(orderDate, 0, 4)
returns first four characters of a string)~>
operator$map
, $sum
and ~>
operator to add up all values in an array