title: Stop While loop in jmeter when condition is true
body: <p>My test plan structure is </p>
  
  <pre><code>Thread Group  
    --Http request    
  while loop controller
    --http request
     --regular expression extractor (get a login config key which is used in while loop)
  </code></pre>
  
  <p>Regular expression:-<code>"business_type":"(.+?)"</code>
  variable name :-<code>business_type</code>
  while loop condition: :- <code>${__javaScript(("${business_type}" === "Apparel &amp; Footwear" &amp;&amp; ${counter} &lt; 5),)</code></p>
  
  <p>I want to stop while loop when the expected business type is found in response.</p>