title: How to Pass an Array from a JSR223 Sampler to Another JSR223 Sampler?
body: <p>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:</p>
  
  <pre><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 &gt; 0) {
      for (int i=0;i&lt;size;i++) {
          strMeetingsArray[i] = json.records.get(i).id;
      }
  }
  </code></pre>
  
  <p>I already got the number of records in <code>intDashboardMeetingsCount</code>, and I just need to know how will I able to get the data of <code>strMeetingsArray[]</code></p>
  
  <p>Thanks in advance!</p>