Reputation: 23
I want to extract tId where "sType= 7"
I've tried to extract all ids from the response and use them randomly, but it doesn't work this way.`
Upvotes: 0
Views: 572
Reputation: 463
There were a lot of errors in JSON. I assumed some tags and fixed it. Refer screenshot below to form your json path
Upvotes: 0
Reputation: 168217
You can use the following JSON Path Expressions in the JSON Extractor:
To extract a random unit id:
$..units.*.id
To extract a random child for the given unit:
$..units[?(@.id == '${unit}')].children.*.id
To extract random content from the child:
$..children[?(@.id == '${child}')].contents.*.id
Demo:
More information:
Upvotes: 0