title: Mongodb mongoose project only matching object element from array in document
body: <p>Here is a document in my Meetings collection</p>
  <pre><code>{
    &quot;_id&quot;: &quot;1&quot;,
    &quot;meetings&quot;: [
      {
        &quot;id&quot;: &quot;00d505a2-5618-4ab1-aa31-7648fd93d41a&quot;,
        &quot;time&quot;: &quot;2022-08-08T22:25:00.000Z&quot;,
      },
      {
        &quot;id&quot;: &quot;37e81a14-b5fa-41ec-8a1a-6558af5d8212&quot;,
        &quot;time&quot;: &quot;2022-08-08T22:30:00.000Z&quot;,
      },
      {
        &quot;id&quot;: &quot;7f21bec2-fbff-4edb-b6ae-ed8ba57f385a&quot;,
        &quot;time&quot;: &quot;2022-08-08T23:15:00.000Z&quot;,
      },
    ]
  }
  </code></pre>
  <p>I am trying to return only the meeting with <code>id: 00d505a2-5618-4ab1-aa31-7648fd93d41a</code></p>
  <p>I wrote a mongoose query like so:</p>
  <pre><code>const testProjection = Meetings.findOne(
    {
      _id: &quot;1&quot;,
      &quot;meetings.id&quot;: &quot;00d505a2-5618-4ab1-aa31-7648fd93d41a&quot;,
    },
    {
      _id: 0,
      meetings: { $elemMatch: { id: &quot;00d505a2-5618-4ab1-aa31-7648fd93d41a&quot; } }
    }
  );
  </code></pre>
  <p>and that returned an object like so:</p>
  <pre><code>{
    meetings: [
      {
        id: '00d505a2-5618-4ab1-aa31-7648fd93d41a',
        time: '2022-08-08T22:25:00.000Z',
      }
    ]
  }
  </code></pre>
  <p>That is in the right direction but not exactly what I want.
  Is it possible to return only</p>
  <pre><code>{
    id: '00d505a2-5618-4ab1-aa31-7648fd93d41a',
    time: '2022-08-08T22:25:00.000Z',
  }
  </code></pre>
  <p>Thanks in advance</p>