Query JSON with JMESPath

Filter, project, and transform nested JSON with a JMESPath expression.

freeworks offlinenothing uploaded
ToolJSON JMESPath
Input
Output
Put this on your own site

The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.

Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.

Preview

How it works

The expression is evaluated by the JMESPath interpreter, which can project fields, filter arrays, and apply functions before the result is serialized. The output type is reported separately from the JSON text.

  • The root expression selects the complete document.
  • The interpreter defines projections and filters rather than a custom path splitter.

Worked example

Extract Nested Field
Query a nested field from a JSON object using dot notation
Input
											{"store": {"name": "BookShop", "location": {"city": "Portland", "state": "OR"}}}
										
Output
												{
  "store": {
    "name": "BookShop",
    "location": {
      "city": "Portland",
      "state": "OR"
    }
  }
}
											

When to use this

AWS CLI responses, fixture filtering, and API projection pipelines use JMESPath.

Edge cases

  • A missing key in a projection yields a null-like result.
  • String and numeric comparisons follow JMESPath type rules.
  • An invalid expression stops with a parse error.

References