JSONPath
A cheatsheet for JSONPath syntax and filters.
JSONPath and dot notation should be used to:
- Get single values from a nested JSON object
- Get values from JSON arrays via indexing and slicing
- Filter lists of JSONs using simple conditions (e.g.
==
,!=
,>
,>=
,<
,<=
)
For advanced filtering, we recommend using the core.transform.filter
action.
Tracecat’s JSONPath implementation is based on jsonpath-ng.
This cheatsheet covers the basics of JSONPath syntax and filters.
Basic Syntax
Replace $
with ACTIONS.<action_name>.result
or TRIGGER
expression contexts.
For the following examples, we’ll use the following JSON:
Dot Notation
Special Characters
Fields containing special characters like dots, dashes, or starting with $
can be accessed using quotes:
Array Indexing
Filters
Basic Filters
Comparison Operators
Multiple Conditions
Was this page helpful?