请教lookup pipeline如何查询二级数组?
表一:
"_id":"2a0398605f1114*****d69a167ebf9ed"
"alist":[[100,101],[200,201],[300,301]]
表二:
"_id":"xxxxxxxxx"
"name":"A"
"aAid":100
------------
"_id":"xxxxxxxxx"
"name":"B"
"aAid":101
--------------
"_id":"xxxxxxxxx"
"name":"C"
"aAid":200
依次
现在想查找出这样的结果
alist:[
{
{aAid:100,name:"A"},
{aAid:101,name:"B"},
}{
{aAid:200,name:"C"},
{aAid:201,name:"C"},
}
...
]
alist如果是一级数组,我知道直接用.match(_.expr($.in(['$aAid', '$$alist'])))这种方式就可以了,但是二级数组我就抓瞎了.