I have this mongoose schema
{
id: mongoose.Schema.Types.ObjectId,
name: String,
initialMailSended: Boolean,
email: String,
users: [{
id: mongoose.Schema.Types.ObjectId,
name: String,
surname: String,
email: String,
signedUp: Boolean,
company: String,
email: String,
attending: String,
accomod: String,
program: String,
food: String,
other: String,
allFood: String,
form: [{
name: String,
value: String,
}]
}]
}
What i need to do is write a mongoose query which find this object by id and in this object find user and update it. I tried various queries but didn't find any which would work.