title: How to filter array of object based on another array values using javascript?
body: <p>I have a simple array of numbers (which for my app represents user Id's). For example...</p>
  
  <pre><code>[1, 2, 3]
  </code></pre>
  
  <p>I also have an array of objects such as</p>
  
  <pre><code>[
      {Id: 1, FirstName: "Bob", LastName: "Jones", EmailAddress: "bob@bob.com"},
      {Id: 2, FirstName: "Tessa", LastName: "Wong", EmailAddress: "tes@wong.com"},
      {Id: 3, FirstName: "Craig", LastName: "Murray", EmailAddress: "Craig@muz.com"},
      {Id: 4, FirstName: "Bryce", LastName: "Willamson", EmailAddress: "email@me.com"},
      {Id: 5, FirstName: "Tony", LastName: "Ocka", EmailAddress: "toni@oz.com"}
  ]
  </code></pre>
  
  <p>What I need to do is match any values that appear in the initial array with they key <code>Id</code> in the second array of objects (and return a new full array of objects containing only matches). So for example in this case, the result I'm looking for is:</p>
  
  <pre><code>[
      {Id: 1, FirstName: "Bob", LastName: "Jones", EmailAddress: "bob@bob.com"},
      {Id: 2, FirstName: "Tessa", LastName: "Wong", EmailAddress: "tes@wong.com"},
      {Id: 3, FirstName: "Craig", LastName: "Murray", EmailAddress: "Craig@muz.com"},
  ]
  </code></pre>
  
  <p>Any help would be really appreciated.</p>