Pagination from flat feed json with Javascript.