【发布时间】:2022-01-17 13:31:55
【问题描述】:
我有这样的数据:
{ id : 1,
book: "Flash",
chapters: [
{
chap_no: "1",
sub_chapter: [
{sub_no: 1, description: "<description>"
},
{sub_no: 2, description: "<description>"
},
]
}
]
}
我想根据 book -> chapter_no -> sub_no 显示一个像这样的字段
{
sub_no: 2, description: "<description>"
}
在 mongodb 查询中。
【问题讨论】: