title: MongoDB finding nested properties
body: <p>So I have a document and model that is structured like this</p>
  <pre><code>{
     &quot;name&quot;:&quot;root&quot;,
     &quot;children&quot;:[
        {
           &quot;_id&quot;:1,
           &quot;name&quot;:&quot;A&quot;,
           &quot;children&quot;:[
              {
                 &quot;_id&quot;:2,
                 &quot;name&quot;:&quot;A child1&quot;,
                 &quot;children&quot;:[
                    
                 ]
              }
           ]
        },
        {
           &quot;_id&quot;:3,
           &quot;name&quot;:&quot;B&quot;,
           &quot;children&quot;:[
              {
                 &quot;_id&quot;:4,
                 &quot;name&quot;:&quot;B child1&quot;,
                 &quot;children&quot;:[
                    {
                       &quot;_id&quot;:5,
                       &quot;name&quot;:&quot;B1 child1&quot;,
                       &quot;children&quot;:[
                          {
                             &quot;_id&quot;:6,
                             &quot;name&quot;:&quot;B1-1 child1&quot;,
                             &quot;children&quot;:[
                                
                             ]
                          }
                       ]
                    }
                 ]
              }
           ]
        }
     ]
  }
  </code></pre>
  <p>if I wanted to find children of A or B of root I can go</p>
  <pre><code>db.treeModel.find({'treeModel.children': 1}
  db.treeModel.find({'treeModel.children': 3}
  </code></pre>
  <p>however, it doesn't seem to work on the ids of the children of the individual nodes. Does mongo or mongoose support this or am I missing an operator?</p>