Paste a JSON object or array into "JSON Input", then enter a JSONata expression in "JSONata Expression".
How to fill the fields:
- JSON Input: the primary JSON payload to query or transform
- JSONata Expression: a standard JSONata expression, or one of the studio helper forms like groupBy(orders, "status")
- Comparison JSON Input: optional second payload evaluated with the same expression so you can compare outputs side by side
- Output Format: renders the evaluated result as JSON, CSV, YAML, or Markdown
- Save Expression: stores the current expression in local history
- Template Name: optional name shown in the saved-expression history
Supported expression styles:
- Standard JSONata, such as $sum(orders.total) or orders[status="paid"]
- Studio helpers without the $ prefix:
- groupBy(collection, "field.path")
- mapField(collection, "field.path")
- flatten(collection)
- distinct(collection)
- count(collection)
- sum(collection)
- avg(collection)
- keys(object)
Example inputs:
- JSON Input: {"orders":[{"id":1,"status":"paid","total":120},{"id":2,"status":"pending","total":40}]}
- Expression: groupBy(orders, "status")
- Expression: sum(orders.total)
- Expression: orders[status="paid"]
Notes:
- The tool uses the real jsonata runtime and preprocesses the helper names above into callable functions.
- Comparison JSON is optional but useful when validating the same transform across two API responses or test fixtures.