I need a pagination/cursor example

Basically, on the last page, you won’t get a cursor. That cursor could be blank or the “key” could be missing from the result completely. Normally there the cursor key is omitted. I test for “does json have a cursor and is that cursor not blank” for choosing if I should attempt to load the next cursored page or not.

Which accounts for if there was a fault and a weird or blanked cursor was returned instead of the key removed.

A cursor being present, means, there is another page to load.
No cursor means no more pages.

1 Like