MongoDB "limit" operator negative value

Viewed 6169
2 Answers

you must send a negative value for limit to mongodb like :

 const options = {
        page: req.query.page || 0,
        limit: -20,
    };
Related