I
I
Ingerniated2017-03-15 23:46:39
JSON
Ingerniated, 2017-03-15 23:46:39

How to output text from json correctly?

json file content

{
"data":
"<h1>Hello everybody, nice to party</h1>"
}

I try to display it
console.log(xhr.JSON.parse(responseText));
but it gives an error and points to this line.
Uncaught TypeError: Cannot read property 'parse' of undefined
    at XMLHttpRequest.xhr.onreadystatechange

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Belyaev, 2017-03-16
@Ingernirated

JSON.parse(xhr.responseText)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question