title: How to compare nested array with regular array?
body: <p>I have these two arrays, one is a nested array and one is a regular array. both containing strings.
  I need to go through the regular array and assess if the elements match only the
  &quot;claims&quot; key and &quot;matches&quot; key but NOT the exclusions key. What is the best way of doing this ?</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>  const claimsArr = [
      {claim:'Protein',matches:['high in protein','^protein'],exclusions:['whey','milk']},
      {claim:'Carbs',matches:['high in carbs','^carbs'],exclusions:['sugar','lactose']},
       ]</code></pre>
  </div>
  </div>
  </p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>  DomArray = [
          "Protein", "whey" , 
        ]
    </code></pre>
  </div>
  </div>
  </p>
  <p>My desired output would be an array of matched items if the DomArray contains whats in &quot;claim&quot; &amp;&amp; &quot;matches&quot; but not &quot;exclusion&quot;</p>
  <p>expected output:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>result = ["Protien", "whey", "high in protein" ,"protein"]</code></pre>
  </div>
  </div>
  </p>