filter return true or false
<p>I'm using filter to find id in data.it return object not true or false.</p>
<p>How can I return true or false if <code>val.recoredId === valueId</code> ?</p>
<pre><code>var hasMatch = data.filter(function (val) {
  return (val.recordId === valueId);
});
        
</code></pre>