> For the complete documentation index, see [llms.txt](https://doc.duaer.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.duaer.com/code/cookbook/jmespath.md).

# Query JSON with JMESPath in Duaer

In Duaer, query JSON with $jmespath(object, "query"). Expressions and the JavaScript Code node can call it; the Python Code node cannot.
## What $jmespath reads in Duaer

The first argument is the object to query, usually $json or one item from an earlier node. The second is a JMESPath string. The query runs on this execution’s data and does not change the original item.

When a dot path is enough, write $json.body.city. Use JMESPath when you need to filter an array or project fields.

```
{{ $jmespath($json, "body.city") }}
```

## Where you can call it

- A Duaer expression can call $jmespath().
- A JavaScript Code node can call it too.
- The Python Code node has no $jmespath. Read fields with Python dictionaries and lists.
## Questions

### How many arguments does $jmespath take in Duaer?

In Duaer, two: the JSON to query (usually $json) and a JMESPath string. The query does not change the original item.

### Can a Duaer Python Code node call $jmespath?

No. Duaer expressions and the JavaScript Code node can. In Python, read fields with dictionaries and lists.

## Related

- [Transform data with expressions in Duaer](https://doc.duaer.com/code/expressions.md)
- [Object transformation methods in Duaer](https://doc.duaer.com/code/builtin/data-transformation-functions/objects.md)
- [Use built-in methods and variables in Duaer](https://doc.duaer.com/code/builtin.md)

