I can fetch the last 10 documents like this:
collection.find({}).sort({_id:1}).limit(10).toArray();
I am building an express api to continuously fetch the next N. For example, Get request with arg=1 would lead to first 10 docs. Get request with arg=2 would then fetch docs 11-20. How do I do that in mongodb?