I have an API that returns the following json:
{
"GetAppendixListResponse": {
"GetAppendixListResult": {
"FileList": {
"string": ["3602","3587"]
},
"Code": "0"
}
}
}
The debug sampler looks like:
JMeterVariables:
AppendixCode_1=["3602","3587"]
AppendixCode_ALL=["3602","3587"]
AppendixCode_matchNr=1
How can I convert ["3602","3587"] from string to a list (for loop_controller)?
2
Answers
convert AppendixCode_1 to array. and use it in loop controller .
Add JSON JMESPath Extractor as a child of the request which returns the above JSON and configure it like:
This way you will be able to see the following JMeter Variables in the Debug Sampler:
Hence the variables could be used in the ForEach Controller