Datasource Loop through JSON data
- 7 years ago
I dont know if this will help or not.
I was playing around with this a couple of week's ago - not specifically for work - I just hadn't used the groovy/xml/json datasources before so started to play around with the functionality.
I had a LOT of trouble with json datasource, perhaps I was doing something wrong (I also find xpath easier to read than jsonpath) - but I found setting it up was a lot easier if I used an XML datasource instead.
Despite the fact that the response of the request that I was using to populate my datasource was actually .json - I added the XML datasource in and specified the 'source property' dropdown on the XML datasource as 'ResponseAsXML'.
I was then able to build up a datasource of attributes successfully sourced from the response without too much trouble.
Just a suggestion,
Cheers,
richie