title: Find by key for nested object in mongoose
body: <p>I want to find a document based on key for nested object in mongoose. For example</p>
  <pre class="lang-json prettyprint-override"><code>{
       &quot;_id&quot;: 1,
       &quot;first_name&quot;: &quot;Tom&quot;,
       &quot;email&quot;: &quot;tom@example.com&quot;,
       &quot;ACL&quot;: {
          123gd: {
            read: true,
            write: false,
          },
          3sg2w: {
            read: true,
            write: false,
          }
       }
  },
  {
       &quot;_id&quot;: 2,
       &quot;first_name&quot;: &quot;Tom&quot;,
       &quot;email&quot;: &quot;tom@example.com&quot;,
       &quot;ACL&quot;: {
          546er: {
            read: true,
            write: false,
          },
          98trw: {
            read: true,
            write: false,
          }
       }
  }
  </code></pre>
  <p>For the above sample document data i want write a method to find and return the document only having <code>ACL key is 123gd</code>.
  that is</p>
  <pre class="lang-json prettyprint-override"><code>{
       &quot;_id&quot;: 1,
       &quot;first_name&quot;: &quot;Tom&quot;,
       &quot;email&quot;: &quot;tom@example.com&quot;,
       &quot;ACL&quot;: {
          123gd: {
            read: true,
            write: false,
          },
          3sg2w: {
            read: true,
            write: false,
          }
       }
  }
  </code></pre>
  <p>So how can i write in mongoose to find the specific document</p>