title: Filter nested array in object array by array of values
body: <p>Considering below object array:</p>
  
  <pre><code>[
      {
          "guid": "j5Dc9Z",            
          "courses": [
              {
                  "id": 1,
                  "name": "foo",                    
              }
          ]
      },
      {
          "guid": "a5gdfS",
          "courses": [
              {
                  "id": 2,
                  "name": "bar",                    
              },
              {
                  "id": 3,
                  "name": "foo",                    
              },    
          ]
       },
       {
          "guid": "jHab6i",
          "courses": [
              {
                  "id": 4,
                  "name": "foobar",                    
              }   
          ]
       },  
       {...}    
  ]
  </code></pre>
  
  <p>I am trying to filter an object array, comparing IDs in the nested <code>courses</code> array with  in the below array:</p>
  
  <pre><code>filter.courses = [1,3]
  </code></pre>
  
  <p>The following line works for the nth value in the array: (via <a href="https://stackoverflow.com/a/41347441/9766768">https://stackoverflow.com/a/41347441/9766768</a>)</p>
  
  <pre><code>let fil = filter(this.results, { courses: [{ id: this.filter.courses[n] }]});
  </code></pre>
  
  <p>However, I'm hoping to achieve this (pseudo code below):</p>
  
  <pre><code>let fil = filter(this.results, { courses: [{ id: this.filter.courses }]});
  </code></pre>
  
  <p>Expected output would be an array of objects containing any of the course IDs elements, in this case:</p>
  
  <pre><code>[
      {
          "guid": "j5Dc9Z",            
          "courses": [
              {
                  "id": 1,
                  "name": "foo",                    
              }
          ]
      },
      {
          "guid": "a5gdfS",
          "courses": [
              {
                  "id": 2,
                  "name": "bar",                    
              },
              {
                  "id": 3,
                  "name": "foo",                    
              },    
          ]
       }   
  ]
  </code></pre>
  
  <p>What would be considered the best solution in this case? Avoiding loops would be a bonus.</p>