title: How to compare a variable from CSV file with the JSON response to determine an assert case in JMETER
body: <p>I am a beginner to jmeter, need some help for a situation. I have JSON response received from an endpoint, The response contains a user collection. I just want to loop on the user collection to match a value. If it matches then pass the assert case.</p>
  <p>Response :</p>
  <pre><code>{
  &quot;company&quot;: {
      &quot;data&quot; : {
          &quot;key&quot;: &quot;SSL-121-TEST&quot;
          &quot;userResult&quot;: [
            {
              &quot;id&quot;: &quot;1001&quot;,
              &quot;consent&quot;: &quot;Yes&quot;,
              &quot;status&quot;: [
                {
                  &quot;code&quot;:&quot;1&quot;,
                  &quot;reason&quot;: &quot;Not Submitted&quot;
                }
              ]
            },
            {
              &quot;id&quot;: &quot;1002&quot;,
              &quot;consent&quot;: &quot;Yes&quot;,
              &quot;status&quot;: [
                {
                  &quot;code&quot;:&quot;2&quot;,
                  &quot;reason&quot;: &quot;No Result Found&quot;
                }
              ]
            },
            {
              &quot;id&quot;: &quot;1003&quot;,
              &quot;consent&quot;: &quot;Yes&quot;,
              &quot;status&quot;: [
                {
                  &quot;code&quot;:&quot;1&quot;,
                  &quot;reason&quot;: &quot;Not Submitted&quot;
                }
              ]
            }
        ]
      }
  }
  </code></pre>
  <p>I am reading the <strong>reason</strong> from the csv file &amp; want to compare with each userResult of the response. If any of the reason matches then assert case should pass.</p>