Split result for XMLHttpRequest request

Hello
I have studied the tutorial on this page: https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Objects/JSON

very interesting, but i have stupid question: when i load a json file with over 1000 records, can i split results and add pagination or load more button?

in the tutorial is used XMLHttpRequest

thanks

Yeah, you could do this, in a number of different ways. You could initially only loop over the first 20 or so of the records, then keep a count of which ones you’ve displayed, then add a button to the page that when pressed loops over the next block of 20, etc.

Thanks, can you show me sample about it? i am newbie in javascript
thanks, this is the code i use in my script:

'use strict';
let requestURL = 'data/data.json';
let request = new XMLHttpRequest();
request.open('GET', requestURL);
request.responseType = 'json';
request.send();
request.onload = function () {
const amzItem = request.response;

showItem(amzItem);
}

   function showItem(jsonObj) {
   const items = jsonObj['Product'];

   for (let i = 0; i < items.length; i++) {

      //my code here
      }
     }