To use populate and aggregate in same statement with Node Mongoose, we call the populate
method.
For instance, we write
Patients.populate(result, { path: "patient" }, callback);
to call the populate
method with result
and an object with the fields to get to populate the result.
callback
is a function with the results.