JMESPath vs JSONPath
Key differences between JMESPath and JSONPath, plus side-by-side examples so you can choose the right query language for your project.
Feature comparison
| Feature | JMESPath | JSONPath |
|---|---|---|
| Standardization | JMESPath (spec + test suite) | No formal standard |
| Prefix | No $ prefix | $ root prefix required |
| Functions | 20+ built-in functions | No built-in functions |
| Projections | Array + object projections | Array projections only |
| Filters | Boolean filters with expressions | Filters vary by implementation |
| AWS CLI | Native support | Not supported |
| Learning curve | Moderate, function-rich | Simple for path traversal |
Side-by-side examples
More examples →Select all book titles
JMESPath
store.book[].titleJSONPath
$.store.book[*].titleFilter price < 10
JMESPath
store.book[?price < `10`].titleJSONPath
$.store.book[?(@.price < 10)].titleProject fields
JMESPath
store.book[].{Title: title, Author: author}JSONPath
$.store.book[*].["title","author"]Count items
JMESPath
length(store.book)JSONPath
$.store.book.length()Sort by price
JMESPath
sort_by(store.book, &price)[].titleJSONPath
No built-in sort (needs client code)When to choose which
- Use JMESPath for AWS CLI, Ansible, Azure CLI, or when you need functions like sort_by, length, join.
- Use JSONPath when you only need path traversal and your runtime already supports it.
- Interoperate: fetch data with JSONPath, reshape with JMESPath, and export with our CSV converter.