Getting the second to last batch of 20 items


Let’s say there are 60 posts in total. I want to fetch 20 at a time. I am using simple:rest package and using Meteor as an API server. How do I fetch the middle 20 posts in a publication? It’s tricky because I don’t have a local minimongo database in my client (iOS app) so it’s impossible for me to just fetch on top of previous collection.


Answering my own question, I can use skip optional field in my find query.