假设我有几个这样的文件
{
title: 'blah',
value: {
"A": {property: "foo"},
"B": {property: "bar"},
"C": {property: "foo"},
"D": {property: "foo"}
}
}
{
title: 'blah2',
value: {
"A": {property: "bar"},
"B": {property: "bar"},
"C": {property: "bar"},
"D": {property: "foo"}
}
}
什么 mongodb 查询会得到我所有的文档/哈希键{property: "foo"}
(我知道这可以在查询后使用 js 来完成,但可以在查询本身内完成吗?)