Mongoose populating array of subdocuments
问题 Apologies if this has already been asked, my searches did not turn up the same situation. I have two schemas something like the below: var experimentSchema = new mongoose.Schema({ name : 'string' elements : [{ type : mongoose.Schema.ObjectId, ref: 'Element' }], resources : [{ type : mongoose.Schema.ObjectId, ref : 'Resource' }], }) var elementSchema = new mongoose.Schema({ name : 'string', component : { type : mongoose.Schema.ObjectId, ref : 'Component' } }) I want to perform a deep