title: How to use a variable in JsonPath filter
body: <p>I'm attempting to use a variable in the RHS of an JsonPath filter expression in a Karate test, similar to this:</p>
  
  <pre><code>* def name = 'A Name'
  * def ids = $response[?(@.name == '#(name)')].id
  </code></pre>
  
  <p>If I use the literal string <code>'A Name'</code> in the RHS of the expression it works as expected.</p>
  
  <p>I've tried various ways to get the variable to evaluate:
  <code>'&lt;name&gt;'</code>, <code>"#(name)"</code>, etc.</p>
  
  <p>I suspect it is because I'm mixing JsonPath parsing with Karate parsing perhaps?</p>