Answer the question
In order to leave comments, you need to log in
How to parse data from JSON response?
I do not understand how to display this in the DOM https://jsonplaceholder.typicode.com/users/1
Here is my GET request:
var log = new XMLHttpRequest()
log.open(
'GET',
'https://jsonplaceholder.typicode.com/users/1',
true
)
log.onreadystatechange = function() {
if (log.readyState != 4) {
return
}
if (log.status === 200) {
let response = JSON.parse(log.responseText );
}
}
log.send();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question