title: How to determine whether an array object has a value, and then return the array of objects with this value,
body: <p>How to determine whether an array object has a value, and then return the array of objects with this value. Because I'm a novice, Similar to fuzzy search, give an example：</p>
  <pre><code>const menu = [
    {
      title: &quot;one&quot;,
      secondLevel:{
        name:&quot;hellobye&quot;,
        children: [{name: &quot;hello&quot;}, {name: &quot;bye&quot;}],
     }
   },
    {
      title: &quot;two&quot;,
      secondLevel:{
        name:&quot;level&quot;,
        children: [{name: &quot;good&quot;}, {name: &quot;night&quot;}],
     }
   }
  ]
  </code></pre>
  <ol>
  <li>Assume input &quot;go&quot;, the result should be:</li>
  </ol>
  <pre><code>menu = [
     {
      title: &quot;two&quot;,
      secondLevel:{
        name:&quot;level&quot;,
        children: [{name: &quot;good&quot;}, {name: &quot;night&quot;}],
     }
   }
  ]
  </code></pre>