title: Looping through data in JMeter and storing data to use in other sampler
body: <p>I have following data in XML response in JMeter:   </p>
  
  <pre><code>&lt;details&gt;
  &lt;srNo&gt;1&lt;/srNo&gt;
  &lt;key&gt;123&lt;/key&gt;
  &lt;Name&gt;Inspector&lt;/piName&gt;
  &lt;age&gt;89&lt;/age&gt;
  &lt;country&gt;India&lt;/country&gt;
  &lt;/details&gt;
  ....................................
  ...................................
  &lt;details&gt;
  &lt;srNo&gt;1&lt;/srNo&gt;
  &lt;key&gt;123&lt;/key&gt;
  &lt;Name&gt;Inspector&lt;/piName&gt;
  &lt;age&gt;89&lt;/age&gt;
  &lt;country&gt;America&lt;/country&gt;
  &lt;/details&gt;
  </code></pre>
  
  <p>suppose I have n number of such data, from the response of the XML file. I want to read value of "key". for eg. 1 I have to read "1" and store in a variable.
  For 1 such response i am reading it in XPath extractor and getting the correct value, but now I have to loop through it to get specified amount of key value in a variable. Suppose if I want 1000 such keys then I have to loop till 1000 times to get all the value in variables.</p>
  
  <p>After getting that value in variables I have to used that value in another Sampler
  for eg: ${key1}</p>