the model is designed as follows
const RegistrationSheet = mongoose.model("RegistrationSheet", new Schema({
doctorId: String,
today: {
time: String,
date: {
morning: [
{
number:Number,
patient: String
}
],
afternoon: [
{
number:Number,
patient: String
}
]
}
},
tomorrow: {
time: String,
date: {
morning: [
{
number:Number,
patient: String
}
],
afternoon: [
{
number:Number,
patient: String
}
]
}
},
afterTomorrow: {
time: String,
date: {
morning: [
{
number:Number,
patient: String
}
],
afternoon: [
{
number:Number,
patient: String
}
]
}
}
}))
now I want to insert a piece of data into the morning of today"s date.
according to the previous doctorId