Also called the aggregation framework.
Group by unique values (example — unique author names):
db.posts.aggregate([
{ $group: { _id: '$author.name' } }
]);
Andrew Dorokhov
schedule
1 min read
Also called the aggregation framework.
Group by unique values (example — unique author names):
db.posts.aggregate([
{ $group: { _id: '$author.name' } }
]);
Happy to help — reach out via the contacts or go straight to my Upwork profile.
work View Upwork Profile arrow_forward