I want to $match only the empty objects in my aggregate(). Is it possible? I know of $exists, but {}'s boolean value is true, so I'm stuck.
$match
aggregate()
$exists
{}
true
Have you tried to just use {field: {}} ?
{field: {}}
For example:
db.users.aggregate([{$match: {val: {}}}])