Skip to main content
JSONata is a small query language for JSON. This page is a list of patterns you’ll reach for often. For the full spec, see jsonata.org. The patterns below are the ones that cover ~90% of workflow use.

Reference fields

Backticks are required when a step name contains spaces or special characters.

Comparisons and logic

Defaults and null-checks

String operations

Number operations

Array operations

Object operations

Conditionals

Date operations

For richer date math, do it in a Code step instead.

Common workflow snippets

Build a Slack mention

Extract domain from email

First non-null

Pick by enum

Sum with filter

Debugging tips

When an expression isn’t producing what you expect:
  1. Inspect ctx at the failing step. Open the run trace, click the step before the failing one, and copy the visible ctx.
  2. Test the expression manually. Paste ctx and the expression into try.jsonata.org — same engine.
  3. Add a Code step temporarily that just returns the raw value, so you can see what JSONata sees.
  4. Check for backticks around step names with spaces (most common bug).