Такое дело, разбираю вывод JSON'a
{ "error" : 0, "questions" : [ { "id" : 1, "text" : "Размер планеты", "correct_answer_id" : 3, "options" : [ { "id" : 1, "text" : "Маленькая"}, { "id" : 2, "text" : "Средняя"}, { "id" : 3, "text" : "Большая"} ] } ] }
var xhr = new XMLHttpRequest();
    xhr.open("GET", "http://" + SERVER_URL + "/get-questions-pack.php", true);
    xhr.setRequestHeader('Accept-Encoding', 'gzip');
    xhr.onreadystatechange =
            function() {
                if (xhr.readyState == xhr.DONE) {
                    if (xhr.status == 200) {
                        var result = JSON.parse(xhr.responseText);
                        switch (result["error"]) {
                            // No error
                            case 0: {
                            }
                            break;
                            // Error
                            case 1: {
                            }
                            break;
                        }
                    }
                    else {
                    }
                }
            }
    xhr.send();
Как видим, до поля error я достучаться смог, а как мне обработать question?
--
Включил мозги и заработало.
result["questions"]["0"]["id"]