【发布时间】:2021-09-13 05:26:05
【问题描述】:
临时班次等于
[{_id:123,
arr:[{_id:123321,name:"Bluh Bluh",date:"bluh bluh"}]
}]
所以我想访问temporaryshifts[0].arr[0] 但我不知道如何访问
$project:{
shiftArr:{$arrayElemAt:['$temporaryshifts',0]}
}
【问题讨论】:
标签: database mongodb mongoose aggregate