Всем привет.
Если такой рабочий код:
fetch(url, options)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log("error", error));
но нужно как-то обработать результат, по типу:
fetch(url, options)
.then(response => response.json())
.then(function(result) {
for (var i=0; i < result.length; i++) {
console.log(result[i]);
}
})
.catch(error => console.log("error", error));
это не правильно и не знаю, как в этом стандарте оформить этот код обработки результата, подскажите пжл.