Sorting and Paging: sort, limit and skip

sort puts results in order (1 up, -1 down) with a second field to break ties, limit caps how many come back, skip passes over the pages before, and countDocuments gives the number of pages.

By

Updated

Cheat sheet: Sorting and Paging: sort, limit and skip
Category
MongoDB
Level
Apprentice
Tags
countDocuments, Cursor (mongodb), mongodb, sort, limit and skip