查询以查找Mongodb列表中具有多个值的键

时间:2016-06-27 16:19:29

标签: mongodb mongodb-query

我在MongoDB中有数据,如下所示

test{ 
[{"key":"469","values":["BALTIMORE","BALTIMORE CITY"]}],
[{"key":"503","values":["BALTIMORE"]}],
[{"key":"505","values":["FAIRFAX"]}],
[{"key":"517","values":["COLUMBIA","BELAIR","BELAIR"]}],
[{"key":"534","values":["BETHEL","BETHEL"]}],
[{"key":"471","values":["HAGGERS","HAGGERS"]}],
[{"key":"587","values":["SAN FRANCISCO","SAN FRANCISCO"]}],
[{"key":"551","values":["DALLAS"]}]};

我想让密钥具有多个值。 喜欢

[{"key":"469","values":["BALTIMORE","BALTIMORE CITY"]}],
[{"key":"517","values":["COLUMBIA","BELAIR","BELAIR"]}],
[{"key":"534","values":["BETHEL","BETHEL"]}],
[{"key":"471","values":["HAGGERS","HAGGERS"]}],
[{"key":"587","values":["SAN FRANCISCO","SAN FRANCISCO"]}],

任何帮助表示感谢。

0 个答案:

没有答案