Tag: limit

June 4, 2021 / MongoDB

When it comes to pagination, the first solution that comes to our mind is fetching all the documents form MongoDB and then create a Javascript function to run on that data to do pagination. But there is a better way, you can use limit, sort and skip mongo function to…