run checks over a list of JSON

Hello,

I have a requirement where after a query to an API it returns a list of JSON objects. I wish to run various checks over each of these objects. I am having trouble, traversing over a list and applying these checks.
This is what I have so far.

`

val v3Scenario = scenario(generateNewScenario)
.exec(
http(getSimulation)
.get(getUrl)
.check(jsonPath("$.result[*]").ofType[String].findAll.saveAs(“resultList”))
).foreach("${resultList}", “result”) {
exec(
check(result.jsonPath($.status).is(live))
.check(???) //etc.
)
}

`

And of course it doesn’t compile, but I wonder if there is something similar I can do get what I want

any help is appreciated.

thanks

Swapnesh.

nevermind, I think I found a way around.
I decided to use transformOpt, and within that I am returning validation with success and failures.

Yeah, that’s probably the easiest way atm.