JSONPath: Query JSON Structures
About this course
JSONPath is a query language for JSON, in the same way XPath is for XML. When you test an API you use it to pull a single value out of a response, filter a list down to the items you care about, and assert on exactly that, instead of matching the whole body. This course covers JSONPath for API testers, with live exercises.
Common JSONPath expressions
| Expression | Returns |
|---|---|
$.user.email |
the email field on the user object |
$.items[0] |
the first item in the list |
$.items[*].id |
the id of every item in the list |
$.items[?(@.price > 10)] |
items priced above ten |
$..sku |
every sku anywhere in the response |
A quick example
# The id of the first order that is still open
$.orders[?(@.status=='open')][0].id
Inside the course you work through wildcards, recursive search, and filters against real API responses, each with instant feedback.
Course Content
About your instructor
Roy de Kleijn · Software testing trainer
Roy de Kleijn has more than 15 years of hands-on experience in software testing and test automation. He writes and maintains every Testsmith course, so what you practise matches how the work is really done.
Connect on LinkedInReviews
I had a great learning experience with the JSONPath: Query JSON Structures course from TestSmith. The concepts were explained in a simple and clear manner, making it easy to understand how to navigate complex JSON structures, access nested objects, work with arrays, and extract specific values. As someone working in QA and API testing, I found this course particularly useful because these concepts are directly applicable to validating API responses in real-world testing scenarios. A special thanks to Roy de Kleijn for putting together this course and explaining the concepts so effectively. The practical approach made learning much easier and more interesting. I would definitely love to explore more courses from TestSmith, especially on Core Java and API Testing, with hands-on exercises and real-world examples. Looking forward to learning more and strengthening my technical skills with TestSmith!
Don't have an account? Register
What you get
- 34 comprehensive lessons
- Learn at your own pace
- Interactive exercises
- Track your progress