JMESPath Playground
Run JMESPath expressions (AWS CLI --query syntax) against JSON.
Overview
The JMESPath playground evaluates a JMESPath expression against a JSON document and shows the result instantly. It's the same query syntax the AWS CLI uses for --query and the same that Azure CLI uses for --query, so you can test a filter here before pasting it into a script.
Cloud engineers and platform teams reach for a jmespath tester when they're trying to extract a specific value from a verbose aws ec2 describe-instances output or a Terraform state file. It also makes a good sketchpad when learning the JMESPath language without invoking the CLI repeatedly.
How it works
JMESPath, specified at jmespath.org, has identifiers, dot navigation, bracket projections, slices, filters with ?, and built-in functions like length, sort_by, to_string, and max_by. Wildcards (*) traverse arrays and objects; multi-select hashes ({a: foo, b: bar}) reshape results into new objects.
The playground parses the expression into an AST, executes it against the pasted JSON document, and returns either a value or an array of matches. Errors are reported with the position in the expression so syntax mistakes are easy to fix.
Examples
Input: { "users": [
{"name":"Alice","age":30,"tags":["admin","ops"]},
{"name":"Bob","age":42,"tags":["dev"]}
]}
Expression: users[*].name
Result: ["Alice","Bob"]
Expression: users[?age > `30`].name
Result: ["Bob"]
Expression: users[*].{name: name, tagCount: length(tags)}
Result: [{"name":"Alice","tagCount":2},{"name":"Bob","tagCount":1}]
FAQ
How is JMESPath different from JSONPath?
JMESPath has a stricter grammar, deterministic evaluation, and a standardised function library. JSONPath has multiple competing implementations and was only formally standardised as RFC 9535 in 2024. The AWS CLI uses JMESPath; many client tools use JSONPath.
Are user-defined functions supported?
No — JMESPath itself doesn't define a way to declare custom functions. The built-in function library is fixed.
Why are numbers in filters wrapped in backticks?
Backticks mark JSON literals in JMESPath. Without them, 30 would parse as an identifier reference, so age > \30`` is the way to compare against the number thirty.