title: How to search for anything from an array of objects,?
body: <p>How to search for anything from an array of objects,?</p>
  <pre><code>const [searchInput, setSearchInput] = useState('');
  
   let cars = [
      {
        &quot;color&quot;: &quot;purple&quot;,
        &quot;type&quot;: &quot;minivan&quot;,
        &quot;registration&quot;: new Date('2017-01-03'),
        &quot;capacity&quot;: 7
      },
      {
        &quot;color&quot;: &quot;red&quot;,
        &quot;type&quot;: &quot;station wagon&quot;,
        &quot;registration&quot;: new Date('2018-03-03'),
        &quot;capacity&quot;: 5
      },
   
    ]
  
  
   return (
    &lt;&gt;
  
       &lt;input type=&quot;text&quot; onChange={(e) =&gt;setSearchInput(e.target.value)}
      {
        cars?.filter(x =&gt; Object.values(x).includes(searchInput.toLowerCase())).map((d) =&gt;{
           console.log(d) // nothing is consoled from here tu
          //show the data here  but nothing is showing here 
          
        })
      }
  
    &lt;/&gt;
   )
  </code></pre>
  <p>No errors but the data are not showing whatsoever, what is wrong here?</p>