JS: request data from github repo in a loop

I need to retrieve data about users from github api but I always get max 30 items and there is over 160 of the items I want to retrieve.
I created a loop in javascript:

for(var i = 1; i < 4; i++) {
    var request = new XMLHttpRequest();
    request.open('get', 'https://api.github.com/orgs/reppo/members?page='+i, true);
    request.send();
    request.response;
    request.onload = print;
}

and print is:

function printPeople() {
    var resObj = JSON.parse(this.responseText);
    var users = [];
    var index = 0;
    for (var i = 0; i < resObj.length; i++) {

        users.push(resObj[i].login);
        if(!document.getElementById('person'+i).innerHTML === "") {
            index += 30;
            document.getElementById('person' + index).innerHTML = resObj[i].login;
        } else {
            document.getElementById('person' + index).innerHTML = resObj[i].login;
        }

        index++;
    }
}

but each iteration overwrites previous.

I have tried to add each user to a div like this:

but it still fills the first 30 divs.

How can I keep the data from he iterations and add new data from new iterations to the same list?


Source: stackoverflow-javascript