我的时间表收集方案如下所示。如何从分组数组中提取一个分组文档?我需要从多个时间表文档中进行此操作。
{
"_id":ObjectId("5b17cde1fb6e1319d48acea3"),
"lectures":[
{
"_id":ObjectId("5b6bef5b43549d19d4af87bb"),
"groups":[
{
"_id":ObjectId("5b6c1d8543549d02276c5030"),
"group_id":ObjectId("5b20ac76fb6e135a054bc39b"),
"start_date": ISODate("2018-08-09T00:00:00 Z"),
"week":0
}
],
"lesson_time_id":ObjectId("5b17cd8ffb6e136ede1edd00")
},
{
"_id":ObjectId("5b6c1d8543549d02276c5033"),
"groups":[
{
"_id":ObjectId("5b6c1d8543549d02276c5032"),
"group_id":ObjectId("5b1fd984fb6e13f5f24036cc"),
"start_date": ISODate("2018-08-09T00:00:00 Z"),
"week":0
}
],
"lesson_time_id":ObjectId("5b17cd8ffb6e136ede1edd01")
}
]
}