When i request for GET request, I’m getting the JSON response, but here my requirement is to validate the structure of response body. For example: The above response having structure, so i need to validate structure instead of one key value pair, how i can achieve this? Answer The best way is to verify json-schema matching. Firstly, you need to
Tag: json-path-expression
JSONPath: Extracting subset of array produces weird results
I have this json: And, I have the follow jq, code that works fine which produces what I want. I now try to use the JSONPath equivalent and this is where it gets strange: If I try it here, I get and array size 1 with my hash: So, that that yields and array, then I can just index that