How to pass values instead of Vector in foreach loop?

My Reponse is:

[
{"id":106455,"assetId":482282,"masterKeyframeId":157060,"closed":false},
{"id":106661,"assetId":502174,"masterKeyframeId":169193,"closed":false}
{.....and so many...}
]

I have fetched “assetId” and “masterKeyframeId” correctly using below request, but the problem is how do I set both values in foreach loop? (I have used “aid” and it fetches single value but don’t know about passing single value for “mkeyframeId” as it takes Vector)

.exec(http("request_7")
            .get(uri3 + "/sortBy=SEGGREGATED_SESSION_SORT;reviewState=IN_PROGRESS")
            .check(jsonPath("$..assetId").findAll.saveAs("astId"))
            .check(jsonPath("$..masterKeyframeId").findAll.saveAs("mkeyframeId"))
            .headers(headers_7)
            )

        .foreach("${astId}", "aid") {
            doIf(session => session("aid").as[String] != "-1")
            {
                exec(http("Set_IDs")
                .get("/a/" + accountname + "/assets/${aid}/keyframe/${mkeyframeId}")
                )
            }
        }   

Here the problem is ${mkeyframeId} it takes vector and pass in url like this,

Sending request=Set_IDs uri=https://qa1.net/a/hbmin1ac/assets/482282/keyframe/Vector(157060,%20169193):

Instead of

https://qa1.net/a/hbmin1ac/assets/482282/keyframe/157060
https://qa1.net/a/hbmin1ac/assets/502174/keyframe/169193

Thanks.

Hi,

Did you try using regex-

.check(regex("""“masterKeyframeId”:\s*"([^"]*)""").saveAs(“mkeyframeId”))

-Pujitha.