I just want to know how to pass an array from a JSR223 sampler to another JSR223 sampler. Note that the two JSR223 are just in the same thread. I had been searching and I cannot find the exact solution. I'm just a newbie in Jmeter, just searching for java codes etc. So here is the code:
import groovy.json.JsonSlurper;
String response = prev.getResponseDataAsString();
def jsonSlurper = new JsonSlurper();
def json = jsonSlurper.parseText(response);
int size = json.records.size;
vars.put("intDashboardMeetingsCount", size);
def strMeetingsArray = new String[size];
if (size > 0) {
for (int i=0;i<size;i++) {
strMeetingsArray[i] = json.records.get(i).id;
}
}
I already got the number of records in intDashboardMeetingsCount, and I just need to know how will I able to get the data of strMeetingsArray[]
Thanks in advance!