JsonPath count of embedded node
"Hi I am trying to count the occurences of an embedded node using Json Path Count assertion.
My Json response looks something like this..
{ "logs":[{"logId" : 1234, "childLogResponse": [ {"logId": 3085031}] }] }
How do I count the number of childLogResponse or match that the childLogResponse logId is a certain ID?
In my JSONPath Expression if I type "logs" and hit Select from current it returns an expected Result 1. If I type "childLogResponse" it returns No match in current response.
If I try "logs.childLogResponse" or "$.logs.childLogResponse" it returns Invalid JsonPath expression.
Many thanks in advance for any help.
Am not aware of jsonpath. Here is a similar solution done using groovy script. Take a look if you wish.
http://stackoverflow.com/questions/35623183/soapui-how-to-find-node-count-in-json-response/35626696#35626696