https://stackoverflow.com/users/6635464/ngshravil-py tepat.
Saya membuat proyeksi lain:
var project2 = {
$project: {
"_id": 1,
"userId": 1,
"accessToken":1,
"count":{$size:"$notifications"},
"notifications._id":1,
"notifications.summaryId": 1,
"notifications.dateCreated":1,
"notifications.dateProcessed":1,
}
};
Kemudian menambahkannya ke saluran agregasi saya:
var agg = [
match,
lookup,
project,
project2,
];
Bekerja ! -- terima kasih https://stackoverflow.com/users/6635464/ngshravil-py