Query and extract data from JSON using JSONPath ($..store.book[*].author) or JMESPath (store.book[].author) expressions. Use this to navigate complex API responses, filter arrays, or reshape JSON data without writing custom parsing code.
Input Parameters
Parameter
Type
Description
jsonrequired
object | array | string
JSON data to query. Can be a parsed object/array or a raw JSON string.
queryrequired
string
JSONPath or JMESPath expression to evaluate against the input data.
dialectoptional
string
Query language: "jsonpath" or "jmespath". Default: "jsonpath".
flattenoptional
boolean
Flatten nested arrays in the result into a single level. Default: false.
Output Fields
Field
Type
Description
result
any
Query result. May be a value, array, or object depending on the expression.
count
integer
Number of matches when the result is an array. 1 for scalar results.
query
string
The query expression that was evaluated (echoed from input).
Discovery hint: Use this tool whenever an agent receives a large JSON payload (from an HTTP API, database response, or file) and needs to extract specific fields, filter arrays by condition, or reshape the structure without custom code.