# JSONPath query

Pull values out of JSON with a JSONPath expression such as $.items[*].name.

- Endpoint: `POST https://setget.net/v1/tools/jsonpath-query` with JSON `{"input": {...}}`
- MCP: `run_tool` with `slug` = `jsonpath-query`
- Page: https://setget.net/tools/jsonpath-query

## Inputs

- `text` (required, string): The JSON to search.
- `path` (required, string): JSONPath expression starting with $.

## Example 1

```json
{"input":{"text":"{\"items\":[{\"name\":\"a\",\"n\":1},{\"name\":\"b\",\"n\":2}]}","path":"$.items[*].name"}}
```

Result:

```json
{"matches":["a","b"],"count":2}
```

## Example 2: Recursive descent

```json
{"input":{"text":"{\"a\":{\"id\":1,\"b\":{\"id\":2}}}","path":"$..id"}}
```

Result:

```json
{"matches":[1,2],"count":2}
```

**Which JSONPath features are supported?** Names, quoted names, indexes, slices, wildcards and recursive descent (..). Filter expressions such as ?(@.price > 10) are not supported.
