update page number according to JSON response