Can you please tell me how to loop through the result of a Regex Post Processor that returns multiple values?
Example:
JSON Response message:
{
"reply": {
"code": "111",
"status": "SUCCESS",
"customerID": [
"222-a",
"b-333",
"44-4",
"s-555",
"666",
"777",
"88-8"
]
}
}
Regx extractor helped me extract each individual component of the array:
links_1=222-a
links_2=b-333
I can use some.url/${links_1}.
Here is exactly what I am trying to achieve, but this does not seem to work.
Can you please help me?
Loop through the Regex extracted individual variable using a counter and append each one in another HTTP request sampler:
WhileController(${__javaScript(${C} < ${links_matchNr})})
HTTPSampler use ${__V(links_${C})}
Counter (start=1,increment=1,maximum=${links_matchNr},referenceName=C)
Use ForEach Controller:
input variable : links
output variable : link for example

You can then use each value inside Controller through:
${link}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With