इसे आजमाएं
Contacts.aggregate({$group: { "_id": { code: "$Code", name: "$Name" } } }, function(err, contacts) {
...
});
या, $match
. के साथ अगर आपको इसकी जरूरत है AgencyTranslation: /^BROADCASTING/
हालत
Contacts.aggregate([
{ $match : { AgencyTranslation: /^BROADCASTING/ } },
{ $group: { "_id": { code: "$Code", name: "$Name" } } }
], function(err, contacts) {
// ...
});