Structural JSON Matching
Shows partial object matching, unordered array membership, and unordered array subset matching.
---
Get User
GET https://jsonplaceholder.typicode.com/users/1
# Matches nested user fields
^ & body ~= {"id":1,"address":{"city":"Gwenborough"}}
# Matches the company subset
^ & body.company ~= {"name":"Romaguera-Crona"}
---
Get Posts
GET https://jsonplaceholder.typicode.com/posts?userId=1
# Contains a matching post object
^ & body ~= {"userId":1,"id":1}
# Contains the expected post subset
^ & body ~= [{"id":1},{"id":2}]