Basic Syntax
Variables
You can define variables for reusable logic:Built-in Functions
JSONata provides many built-in functions:- String Functions
- Numeric Functions
- Aggregation Functions
- Boolean Functions
- Array Functions
- Object Functions
- Date/Time Functions
| Function | Description | Example |
|---|---|---|
$sum() | Sum array values | items.price ~> $sum() |
$count() | Count items | $count(items) |
$now() | Current timestamp | $now() |
$string() | Convert to string | $string(id) |
$number() | Convert to number | $number(amount) |
$lowercase() | Lowercase string | $lowercase(name) |