Querying for Object in Mongoose Sub Array
<p>I have a Schema that looks like this: </p>

<pre><code>var LibrarySchema = new Schema({
    id: String,
    contactNumber: String,
    collections: [{
        id: String,
        description: String
        subCollections: [{
            id: String,
            description: String,
            recentlyUpdated: Boolean
        }, {
            id: String,
            description: String,
            recentlyUpdated: Boolean
        }]
    }]
})

module.exports = mongoose.model('Library', LibrarySchema); 
</code></pre>

<p>All the ID's are unique. There can be multiple Libraries inside a District (another array). </p>

<p>My question is, how would I query into the nested arrays to get the desired object? To be more precise, how would I get a specific subCollection object, given a Library ID, Collection ID, and subCollection ID. </p>