title: How to loop through karate response array and pass this in json path of another web service response
body: <p>I am using Karate version 0.8.0.1 and I want to perform following steps to test some responses.</p>
  <ol>
  <li><p>I make a Get to web service 1</p>
  </li>
  <li><p>find the value for currencies from the response of web service 1 using jsonpath: <code>$.currencies</code></p>
  </li>
  <li><p>Step 2 gives me following result:  <code>[&quot;USD&quot;,&quot;HKD&quot;,&quot;SGD&quot;,&quot;INR&quot;,&quot;GBP&quot;]</code></p>
  </li>
  <li><p>Now I use Get method for web service 2</p>
  </li>
  <li><p>From the response of web service 2 I want to get the value of price field with json-path something like below(passing the values from step 3 above):</p>
  <p><code> $.holding[?(@.currency=='USD')].price</code></p>
  <p><code> $.holding[?(@.currency=='HKD')].price</code></p>
  <p><code> $.holding[?(@.currency=='SGD')].price</code></p>
  <p><code> $.holding[?(@.currency=='INR')].price</code></p>
  <p><code> $.holding[?(@.currency=='GBP')].price</code></p>
  </li>
  </ol>
  <p>So there are so many currencies but I want to verify price for only the currencies returned by web service 1(which will be always random) and pass it on to the the output of web service 2 to get the price.
  Once i get the price I will match each price value with the value returned from DB.</p>
  <p>I am not sure if there is any simple way in which I can pass the values returned by service 1 into the json-path of service 2 one by one and get the results required. Any suggestions for doing this will be helpful As this will be the case for most of the web services I will be automating.</p>