title: How to get same values from 2 arrays with objects in ES6 Javascript?
body: <p>So I have here two different arrays.</p>
  <pre><code>const test = [
      { firstName: &quot;John&quot;, lastName: &quot;Doe&quot; },
      { firstName: &quot;Michael&quot;, lastName: &quot;Sins&quot; },
      { firstName: &quot;Alex&quot;, lastName: &quot;Brown&quot; }
    ];
  </code></pre>
  <pre><code>const test2 = [
      { firstName: &quot;Lisa&quot;, lastName: &quot;Shore&quot; },
      { firstName: &quot;John&quot;, lastName: &quot;Doe&quot; },
      { firstName: &quot;Justin&quot;, lastName: &quot;Park&quot; },
    ];
  </code></pre>
  <p>What I want is to get the same values from the two arrays using ES6 (filter if possible) or in any way that fits to achieve the output. The result that I want to get is :</p>
  <pre><code>[{ firstName: &quot;John&quot;, lastName: &quot;Doe&quot; }]
  </code></pre>