I am trying to use mongoose populate function but in response I am getting empty array, I have seen multiple posts regarding this
var MerchantSchema = new mongo
Can you try by removing second parameter from the findBbyId:
findBbyId
Merchant .findById( req.params.id) .populate('packages') .exec(function (err, merchant) { if (err) next(err); else res.status(200).json(merchant); });