title: jMeter - Re-use response data in follow-up requests
body: <p>We have a service that works the following way:</p>
  
  <p>First, a request with search parameters is sent, for which we get back a searchId. This searchId is then used to continue fetching information until service response it has no more data left (hasMore parameter becomes "false").</p>
  
  <p>The question is this - I have set up jMeter to send first requests, but not certain how then to keep sending requests in parallel for each response in the Thread Group, and need your advice on it. My thought was to set up another Thread Group since I cannot set it inside the first one, but then how do I get access to responses and process them in parallel?</p>
  
  <p><strong>EDITED</strong>:</p>
  
  <p><em>This is what I ended up with. First Beanshell Sampler extracts searchId and hasMore and puts it into vars. Second Sampler extracts hasMore and again puts it into vars, overwriting the first. At the end, the While loop worked as intended, using ${__javaScript("${hasMore}" == "1",)}.</em></p>
  
  <p><a href="https://i.stack.imgur.com/joOWx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/joOWx.png" alt="Project Test Plan"></a></p>