Hi,
I tested this on a free version of SoapUI but it should work the same on the pro version:
import groovy.json.JsonSlurper
def json = """
{
"totalCount": 1375,
"results": [
{
"title": "florence italy may 12 ryder ...",
"metadata": {
"caption": "florence italy may 12 ryder ...",
"standard.license": "RF",
"base.thumb_large.width": "100",
"base.thumb_large.height": "150",
"base.thumb_small_width": "67" }
},
{
"title": "Title number 2...",
"metadata": {
"caption": "florence italy may 12 ryder ...",
"standard.license": "RF",
"base.thumb_large.width": "100",
"base.thumb_large.height": "150",
"base.thumb_small_width": "67" }
},
{
"title": "Title number 3 ...",
"metadata": {
"caption": "florence italy may 12 ryder ...",
"standard.license": "RF",
"base.thumb_large.width": "100",
"base.thumb_large.height": "150",
"base.thumb_small_width": "67" }
} ]
}
"""
def slurper = new JsonSlurper()
def parsedJson = slurper.parseText( json )
def resultsCount = parsedJson.results.size
for (int i = 0; i < resultsCount; i++) {
assert parsedJson.results[i].metadata.caption.equals( "florence italy may 12 ryder ..." )
}
Cheers! :catvery-happy: