【发布时间】:2020-03-16 03:53:56
【问题描述】:
这是附件中的 2 个文档。我需要根据过滤器提取标题字段(哈里森福特是演员字段中的第一个元素)。所以我需要拉第二个文件。感谢您的帮助。
{
"_id" : ObjectId("5e66e96a2f86fd04deaa59c5"),
"title" : "Star Trek Into Darkness",
"actors" : [
"Chris Pine",
"Zachary Quinto",
"Harrison Ford",
"Karl Urban"
]
}
{
"_id" : ObjectId("5e66e96a2f86fd04deaa59c6"),
"title" : "Raiders of the lost ark",
"actors" : [
"Harrison Ford",
"Jonathan Frakes",
"Brent Spiner",
"LeVar Burton"
]
}
【问题讨论】:
标签: arrays mongodb filter element projection