2

Paginate JSON object

 2 years ago
source link: https://gist.github.com/AlanBinu007/b4b765f83d5e8975ba85f6d291f302e3
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Paginate JSON object · GitHub

Instantly share code, notes, and snippets.

Paginate JSON object

var paginate = function(page, limit) { page = page || DEFAULT_PAGE limit = limit || DEFAULT_LIMIT return json_obj.slice((page - 1) * limit).slice(0, limit) }


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK