Paginate JSON object
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.
Paginate JSON object · GitHub
Instantly share code, notes, and snippets.
var paginate = function(page, limit) { page = page || DEFAULT_PAGE limit = limit || DEFAULT_LIMIT return json_obj.slice((page - 1) * limit).slice(0, limit) }
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK