Có cách nào để thực hiện $ hoặc câu lệnh trong phần tử khớp không?
Tôi có điều này:
opened: {
$elemMatch: {
closed: false
openingEvening: {$lte: currentTime},
closingEvening: {$gte: currentTime},
}
}
và muốn thêm openingMorning đến l
Làm thế nào tôi có thể mở rộng nó như:
opened: {
$elemMatch: {
closed: false
{$or: [
{openingEvening: {$lte: currentTime}, closingEvening: {$gte: currentTime},},
{openingMorning: {$lte: currentTime}, closingMorning: {$gte: currentTime}}
]
}
}
}
là một cái gì đó như thể này?