Mastering JSONPath for API Testing on iPhone, iPad, and Mac
API responses can easily grow into thousands of lines of JSON. Searching manually wastes time and often leads to missed details.
This is where JSONPath comes in — a query language that lets you instantly filter, search, and extract exactly the data you need.
In this article, we’ll cover JSONPath basics, advanced use cases, and how to use it directly inside API Orbit — a native API client for iPhone, iPad, Mac, and Vision Pro.

What is JSONPath?
JSONPath is to JSON what XPath is to XML. It works like a search engine for JSON responses. With JSONPath you can:
- Access a property by name:
$.user.name
- Select an array element:
$.items[0]
- Filter by conditions:
$.books[?(@.price < 10)]
- Search recursively through nested objects:
$..author
Example JSON Response
Here’s a sample API response with user data:
{
"data": [
{
"id": 1,
"email": "george.bluth@reqres.in",
"first_name": "George",
"last_name": "Bluth",
"avatar": "https://reqres.in/img/faces/1-image.jpg"
},
{
"id": 2,
"email": "janet.weaver@reqres.in",
"first_name": "Janet",
"last_name": "Weaver",
"avatar": "https://reqres.in/img/faces/2-image.jpg"
},
{
"id": 3,
"email": "emma.wong@reqres.in",
"first_name": "Emma",
"last_name": "Wong",
"avatar": "https://reqres.in/img/faces/3-image.jpg"
}
],
"page": 1,
"per_page": 6,
"total": 12,
"total_pages": 2
}
Basic JSONPath Queries
📧 Get all emails:
$.data[*].email
Output:
[
"george.bluth@reqres.in",
"janet.weaver@reqres.in",
"emma.wong@reqres.in"
]
🆔 Get all IDs:
$.data[*].id
Output:
[1, 2, 3]
🖼️ Extract all avatars:
$.data[*].avatar
Output:
[
"https://reqres.in/img/faces/1-image.jpg",
"https://reqres.in/img/faces/2-image.jpg",
"https://reqres.in/img/faces/3-image.jpg"
]
👨 Find user by name:
$.data[?(@.first_name == "George")]
Output:
[
{
"id": 1,
"email": "george.bluth@reqres.in",
"first_name": "George",
"last_name": "Bluth",
"avatar": "https://reqres.in/img/faces/1-image.jpg"
}
]

Using JSONPath Inside API Orbit
In API Orbit , JSONPath is built right into the response viewer. You don’t need to copy JSON into a separate tool — just run your request, open the Filter option, and start typing.
- On Mac, the filter opens in a separate window.
- On iPhone, iPad, and Vision Pro, it appears as a sheet.
- On Mac, you can also use the shortcut ⌘ + ⇧ + F.
As you type, the JSON response updates live in a read-only editor, showing exactly the data you’re looking for.

Advanced Filters
API Orbit supports advanced JSONPath features:
- Users with a specific last name:
$.data[?(@.last_name == "Weaver")]
Returns all users whose last_name equals "Weaver".
- Users with IDs greater than 1:
$.data[?(@.id > 1)]
Keeps only records where id > 1.
- All first names recursively:
$..first_name
Collects every first_name value anywhere in the document (recursive descent).
- Combine conditions:
$.data[?(@.id > 1 && @.last_name == "Wong")]
Returns users where both conditions are true: id > 1 and last_name == "Wong".
Even Yoda would agree: mastering APIs takes practice.

Practical Use Cases
- Quickly filter user data from long API responses.
- Validate IDs or emails across datasets.
- Extract avatar URLs for testing media endpoints.
- Debug nested structures in real-world APIs.List item
Conclusion
JSONPath transforms messy, deeply nested JSON into clear, actionable insights. Instead of scrolling endlessly through raw API responses, you can instantly filter, search, and extract just the data you need.
With API Orbit, JSONPath becomes even more powerful — seamlessly integrated into your API workflow on iPhone, iPad, Mac, and Vision Pro. You don’t just send requests, you gain clarity and speed across all Apple devices.
👉 Try API Orbit today and explore JSONPath with real API responses!