有一个数组,例如:
var arr = ["1","1.1","1.3","2","2.1","2.2","2.3"]
和一个 Collection A ,就像这样
[ {_id:"1",儿童:["1.1","1.4"]}, {_id:"2",儿童:["2.1","2.2"]}, {_id:"3",children:["3.1","3.2"]} ]
经过
寻找({....})我想得到结果
[ {_id:"1",儿童:["1.1"]}, {_id:"2",儿童:["2.1","2.2"]}, ]
结果子数组是 arr
和集合A
的交集children
如何设置查询运算符?