These are chat archives for Automattic/mongoose

13th
Oct 2016
Jay Shah
@shreejibawa
Oct 13 2016 05:29
please help me with this.. I am stuck:
Yogesh Patel
@ycpatel813
Oct 13 2016 06:51
@shreejibawa solved??
Pierre Humberdroz
@phumberdroz
Oct 13 2016 21:53
export function getOneSeries(req, res) {
  Series.findOne({slug: req.params.slug}).populate('seasons.episodes').sort('seasons.season').exec((err, series) => {
    if (err) {
      res.status(500).send(err);
    }
    res.json({series, success: true});
  });
}

the sort does sadly not work somehow..

here you can see the data: https://bingetrackr.com/api/series/arrow