SyntaxFix
Write A Post
Hire A Developer
Questions
You can call $setUnion on a single array, which also filters dupes:
$setUnion
{ $project: {Package: 1, deps: {'$setUnion': '$deps.Package'}}}