title: JavaScript filter array by data from another
body: <p>I have an array object:</p>
  <pre><code>[
      { id:1, name: 'Pedro'},
      { id:2, name: 'Miko'},
      { id:3, name: 'Bear'},
      { id:4, name: 'Teddy'},
      { id:5, name: 'Mouse'}
  ]
  </code></pre>
  <p>And I have an array with ids [1, 3, 5],</p>
  <p>How can I filter the array object to leave records only with id's from the second one?</p>