我的查询是:
db.tbljournal.aggregate(
// Pipeline
[
// Stage 1
{
$group: {
_id: {
Jid: '$Jid',
JName: '$JName'
},
Article: {
$addToSet: {
"ArtNo": "$ArtNo",
"ArtName": "$ArtName",
"Department": {
"CE": "$CE",
"Dept": "$Dept",
"CEInOutDt" :{
"CEInDate": "$CEInDate",
"DeptInDate": "$DeptInDate"
}
}
}
}
}
}
]
).pretty();
但是我得到下面的错误。这有什么问题。请指教。
显示所有172种可能性? (y或n)
...“ CEInOutDt”:{Date“:” $ CEInDate“, 2018-07-12T16:03:17.344 + 0530 E查询[thread1]语法错误:缺少:属性ID @(shell)之后:19:17 “ DeptInDate”:“ $ DeptInDate”
2018-07-12T16:03:17.347 + 0530 E查询[thread1]语法错误:缺少;声明前@(shell):1:12 }
2018-07-12T16:03:17.350 + 0530 E查询[thread1]语法错误:预期表达式,得到'}'@(shell):1:0 }
2018-07-12T16:03:17.351 + 0530 E QUERY [thread1]语法错误:预期表达式,得到'}'@(shell):1:0 }
2018-07-12T16:03:17.352 + 0530 E查询[thread1]语法错误:预期表达式,得到'}'@(shell):1:0 }
2018-07-12T16:03:17.353 + 0530 E查询[thread1]语法错误:预期表达式,得到'}'@(shell):1:0 }