> For the complete documentation index, see [llms.txt](https://docs.cloud.hoverfly.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cloud.hoverfly.io/create-simulations/configuring-request-matchers/json-request-matchers-on-the-body/jsonpath-matcher.md).

# JSONPath Matcher

JSONPath matching is used to test for the existence of JSON based on a JSONPath query. If a query is specified that returns a result (any result) after being run against the request body payload, then it matches.

### JSONPath Matching example:

| **Matcher value** | **Positive payload**                                                                                                      | **Non match payload**                                                                                    |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| $.name            | <p>{</p><p>"name": "John",</p><p>"surname": "Doe"</p><p>}</p>                                                             | <p>{</p><p>"age": 30,</p><p>"surname": "Doe"</p><p>}</p>                                                 |
| $.people\[0].age  | <p>{</p><p>"people": \[</p><p>{</p><p>"name": "John",</p><p>"surname": "Doe",</p><p>"age": 30</p><p>}</p><p>]</p><p>}</p> | <p>{</p><p>"people": \[</p><p>{</p><p>"name": "John",</p><p>"surname": "Doe"</p><p>}</p><p>]</p><p>}</p> |
