title: How to filter an array of objects with names from another array of objects
body: <p>I'm new to Javascript and I'm struggling with how to use the map, filter, find and other functions. I have two arrays of objects, and I wanted to filter the first one with the second.</p>
  <pre class="lang-js prettyprint-override"><code>const users = [ 
    { name: 'Anna', age: 22, gender: 'F' }, 
    { name: 'John', age: 25, gender: 'M' },
    { name: 'Mary', age: 27, gender: 'F' },
    { name: 'Joe',  age: 30, gender: 'M' } 
  ] 
  
  const filter = [ 
    { name: 'Anna' }, 
    { name: 'John' } 
  ] 
  
  // Here is the expected result:
  const expected_result = [ 
    { name: 'Anna', age: 22, gender: 'F' },
    { name: 'John', age: 25, gender: 'M' } 
  ] 
  </code></pre>
  <p>Does anyone know what is the best way to do this?</p>