Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/wcf/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Mongodb 为数组查询mongo db_Mongodb - Fatal编程技术网

Mongodb 为数组查询mongo db

Mongodb 为数组查询mongo db,mongodb,Mongodb,我想查询查询属性列表中存在所有属性的插槽。 对于上面的示例,它将返回slot1和slot2。插槽3的“f”属性不属于查询属性列表。 有人知道在这种情况下如何查询MongoDB吗?MongoDB聚合查询已经设置了运算符;这就是你要找的。谢谢@prasad_。这就是我要找的。 slot1.attributes = [a,b] slot2.attributes = [c,d] query_attributes_list = [a,b,c,d,e] slot3.attributes = [e,f]

我想查询查询属性列表中存在所有属性的插槽。 对于上面的示例,它将返回slot1和slot2。插槽3的“f”属性不属于查询属性列表。
有人知道在这种情况下如何查询MongoDB吗?

MongoDB聚合查询已经设置了运算符;这就是你要找的。谢谢@prasad_。这就是我要找的。
slot1.attributes = [a,b]
slot2.attributes = [c,d]  query_attributes_list = [a,b,c,d,e]
slot3.attributes = [e,f]