title: How to match JSON values with Response values in Karate
body: <p>I want to match JSON values with Response values in Karate.
  How to retrieve all field values from JSON and Response and match them?
  Any solution is much appreciated
  Below is sample JSON and Response</p>
  
  <pre><code> JSON: {
      "Field1": 123,
      " Field2": 456,
      " Field3": "O",
      " Field4": 1000
    },
    {    "Field1": 678,
      " Field2": 234,
      " Field3": "P",
      " Field4": 2000
    }
  ]
  
  Response:
  &lt;S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"&gt;
     &lt;S:Header/&gt;
     &lt;S:Body&gt;
        &lt;ns12: Response&gt;
           &lt;ns12: ResponseList&gt;
              &lt;ns7: Field1&gt;123&lt;/ns7: Field1&gt;
              &lt;ns7: Field2&gt;456&lt;/ns7: Field2&gt;
              &lt;ns7: Field3&gt;O&lt;/ns7: Field3&gt;
              &lt;ns7: Field4&gt;1000&lt;/ns7: Field4&gt;
  
           &lt;/ns12: ResponseList &gt;
           &lt;ns12: ResponseList &gt;
              &lt;ns7: Field1&gt;678&lt;/ns7: Field1&gt;
              &lt;ns7: Field2&gt;234&lt;/ns7: Field2&gt;
              &lt;ns7: Field3&gt;P&lt;/ns7: Field3&gt;
              &lt;ns7: Field4&gt;2000&lt;/ns7: Field4&gt;
           &lt;/ns12: ResponseList &gt;
        &lt;/ns12: Response &gt;
     &lt;/S:Body&gt;
  &lt;/S:Envelope&gt;
  </code></pre>