MongoDB
 sql >> Datenbank >  >> NoSQL >> MongoDB

Node js Mungo-Populationslimit

City.find({}).populate({
    path:'Articles',
    options: {
        limit: 2,
        sort: { created: -1},
        skip: req.params.pageIndex*2

    }
}).exec(function (err, cities) {
    if (err) return handleError(res, err);
    return res.status(200).json(cities);
});