How to develop cursor based pagination with mongoose like twitter APIs?
I want to make service for fetching all users list in mongoose. And the retrieve json should be.
{
data:[{},{}],
nextUrl:'/find-user/2/'},
next:true
}
And If next data not be there so then it should be..
{
data:[{},{}],
nextUrl:'/find-user/2/'},
next:false
}
Lots of thanks in advance.