Hi All,
I have two lists captured from previous regex. My requirement is to loop through these lists and write the values to a file. I’m trying to do it with the below code.
.check(regex(",“accountNumber”:"(.+?)",“sortCode”").findAll.saveAs(“accountNumber”))
.check(regex(",“iban”:"(.+?)",“accountNumber”").findAll.saveAs(“iban”))
.foreach("${accountNumber}", “accountNumber_id”, “counter”)
{
exec(http(“XXXXXXX”)
.post(“YYYYYYYYY”)
.exec(session => { CreateFeederFile.createFPSFeeder("${accountNumber_id}", “${iban(counter)}”)
session
})
}
But all I can see in the file is as below.
${accountNumber_id},${iban(counter)}
The values are not being replaced.
I can see my code is not working but not sure how I can achieve my requirement.
Please can you help.
Regards,
Prash.