title: Filtering MongoDB collections within collection using MongoDB Shell
body: <p>Apologies for the nood question. I'm just starting out using MongoDB and MongoDB Shell.</p>
  <p>I've got a DB called Dealers that looks a little like this (very simplified):</p>
  <pre><code>        [
      {
          &quot;Id&quot;: 1,
          &quot;Vehicles&quot;: [
          {
              &quot;Manufacturer&quot;: &quot;Ford&quot;
          },
          {
              &quot;Manufacturer&quot;: &quot;MG&quot;
          },
          {
              &quot;Manufacturer&quot;: &quot;Citroen&quot;
          }
          ]
      },
      {
          &quot;Id&quot;: 2,
          &quot;Vehicles&quot;: [
          {
              &quot;Manufacturer&quot;: &quot;Ford&quot;
          },
          {
              &quot;Manufacturer&quot;: &quot;Nissan&quot;
          },
          {
              &quot;Manufacturer&quot;: &quot;Ford&quot;
          }
          ]
      }
      ]
  </code></pre>
  <p>I'm trying to get my head round how you filter collections within collections EG. Say I wanted to select all the Ford's from Id 2.</p>
  <p>I get as far as:</p>
  <pre><code>const dealer = database.collection('Dealers');
  const result = await dealer.find({Id: 2})
  </code></pre>
  <p>and I tried:</p>
  <pre><code>const result = await dealers.find({
      Id: 2,
      Vehicles: [
          {
              Manufacturer: &quot;Ford&quot;
          }
      ]
  })
  </code></pre>
  <p>But I know that won't work because it's not iterating through the Vehicles collection. Is this the sort of instance that you would use an aggregation? Like I say, I'm very new to this sort of environment, and would really appreciate any pointers please.</p>