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.

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 expressionCopy-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.