MongoDB Aggregate Node.js
myDataBase.aggregate(pipeline)
.toArray()
.then(respond => {
return respond == null ? res.json([]) : res.json(respond);
})
abdelghanyMh