title: JavaScript - Find multiple objects by IDs existing in prefined list from an array of objects without using the for loop
body: <p>I have a JavaScript array of objects:</p>
  
  <pre><code>var my_array = [
    {
      "id" : 1,
      "aas_name" : "aaa"
    },
    {
      "id" : 2,
      "aas_name" : "bbb"
    },
    {
      "id" : 3,
      "aas_name" : "ccc"
    },
    ...
     ...
      ...
    ,
    {
      "id" : 10,
      "aas_name" : "jjj"
    }
  ]
  </code></pre>
  
  <p>I would like to find all objects in the <code>my_array</code>, each of which has the id value that exists in a pre-defined array [1, 3, 8] for instance without having to use the <code>for... loop</code> and ES6 arrow function style.</p>
  
  <pre><code>var result = [
    {
      "id" : 1,
      "aas_name" : "aaa"
    },
    {
      "id" : 3,
      "aas_name" : "ccc"
    },
    {
      "id" : 8,
      "aas_name" : "hhh"
    }
  ]
  </code></pre>