我想用逗号分隔值。那么如何在聚合框架中使用group / concat?
文档联系人
\1
文档机会
{
"_id" : "9c612c95054fb46e3de8dee8",
"name" : "name1",
"oppID" : [
"5c612c95054fb46e3de8bcc5",
"5bd6b334cba7d2241a3ba9d9"
]
},
{
"_id" : "1c612c95054fb46e3de8dcde9",
"name" : "name2",
"oppID" : [
"5c612c95054fb46e3de8bcc5",
"5bd6b334cba7d2241a3ba9d9"
]
}
我想获得如下的联系人列表,
{
"_id" : "5c612c95054fb46e3de8bcc5",
"name" : "opp name 01",
},
{
"_id" : "5bd6b334cba7d2241a3ba9d9",
"name" : "opp name 02",
},