猫鼬聚合展开对象数组

时间:2020-09-22 14:49:51

标签: node.js mongodb express mongoose nestjs

我在db中有一个名为“ schedule”的数组,其中“ dayOfWeek”(枚举)是星期几,而“ timeOfDay”是位掩码。

"schedule": [
    {"dayOfWeek": 1 ,"timeOfDay": 120 },
    {"dayOfWeek": 2 ,"timeOfDay": 120 },
    {"dayOfWeek": 4 ,"timeOfDay": 248 }
]

作为搜索查询,我将发送此消息:

"schedule": [
    {"dayOfWeek": 1 ,"timeOfDay": 120 },
    {"dayOfWeek": 4 ,"timeOfDay": 248 }
]

如何为用户提供与此搜索参数相匹配的计划?

0 个答案:

没有答案