My aggregate $group is:
{
$group: {
_id: { ["$dayOfYear"]: "$TagDateCreated" },
disqualified: {
$addToSet: {
$cond: {
if: { $in: [ "$TagId", [109,220,115,113,238] ]},
then: "$ContactId",
else: null
}
}
}
}
}
Which gives me a unique set of contactId's as disqualified but I need the null values removed. I've tried omitting the else statement int he $cond and various $filters in the $project that either don't remove anything, remove everything, or error.
所有评论(0)