Mongoose: how to use aggregate and find together
问题 How can I use aggregate and find together in Mongoose? i.e I have the following schema: const schema = new Mongoose.Schema({ created: { type: Date, default: Date.now() }, name: { type: String, default: 'development' } followers: [{ type: Mongoose.Schema.ObjectId, ref: 'Users'}] ... }) export default Mongoose.model('Locations', schema) How can I query the users with only the fields name and followers_count . followers_count : the length of followers . There, I know we can use select to get