SoftwareTestPilot
API TestingPublished: 7 min read

JSONPath Cheat Sheet for API Testers (2026)

The complete JSONPath cheat sheet for API testers — filters, wildcards, recursion, and copy-paste examples for Postman, Rest Assured, and Playwright.

Avinash K
Founder & QA Engineer at SoftwareTestPilot
Share:XLinkedInWhatsApp
JSONPath cheat sheet for API testers
JSONPath cheat sheet for API testers

2026-07-17 · By Avinash K

JSONPath is the fastest way to pluck values out of a JSON response for assertions. This cheat sheet covers every operator you'll actually use, with runnable examples you can validate live in the free JSON / JSONPath / JMESPath Tester.

Core syntax

$              root
@              current element (inside filters)
.name          child by name
['name']       child by name (bracket form)
..name         recursive descent (any depth)
*              wildcard
[n]            array index
[n,m]          multiple indices
[start:end]    array slice
[?(@.x > 1)]   filter expression

Copy-paste examples

Sample JSON:
{ "orders": [
    { "id": 1, "total": 45, "status": "paid" },
    { "id": 2, "total": 120, "status": "pending" },
    { "id": 3, "total": 30, "status": "paid" }
]}

$.orders[*].id                       -> [1, 2, 3]
$.orders[0].total                    -> 45
$..status                            -> ["paid","pending","paid"]
$.orders[?(@.status=='paid')].id     -> [1, 3]
$.orders[?(@.total > 50)].id         -> [2]
$.orders[-1:].id                     -> [3]

Postman

const body = pm.response.json();
pm.test("first order is paid", () => {
  pm.expect(body.orders[0].status).to.eql("paid");
});

Rest Assured

given().when().get("/orders")
  .then().body("orders.findAll { it.status == 'paid' }.id", hasItems(1, 3));

Playwright

const res = await request.get('/orders');
const body = await res.json();
expect(body.orders.filter((o:any)=>o.status==='paid').map((o:any)=>o.id)).toEqual([1,3]);

Test your expressions live

Paste any JSON and a JSONPath expression into the JSON / JSONPath / JMESPath Tester to see instant matches. It also exports the assertion as Postman, Rest Assured, Playwright, or curl code.

Frequently asked questions

1.Is JSONPath standardised?
RFC 9535 (2024) finally standardised JSONPath. Most existing implementations already comply.
2.Can JSONPath modify values?
No. JSONPath is a query language; use jq or JMESPath libraries with mutation helpers if you need transforms.
3.Does Postman support JSONPath natively?
Yes — via pm.expect on the parsed body, or through third-party helpers. Most testers just use JS object access.
4.JSONPath or JMESPath?
JSONPath is more concise for filters; JMESPath has richer functions and multi-select projections. See our JMESPath comparison post.