Answer the question
In order to leave comments, you need to log in
Why are quotes not escaped in JSON.parse?
Good day to all.
I ran into a problem: in the th application I send json to the page
{"art_slice":[{"title":"Заголовок","content":"Содержимое статьи"},{"title":"Заголовок второй статьи","content":"Содержимое второй статьи"}]}
const resolve = "{"art_slice":[{"title":"Заголовок","content":"Содержимое статьи"},{"title":"Заголовок второй статьи","content":"Содержимое второй статьи"}]}"
const user = JSON.parse(resolve);
$scope.x = angular.fromJson("{\"art_slice\":[{\"title\":\"Заголовок\",\"content\":\"Содержимое статьи\"},{\"title\":\"Заголовок второй статьи\",\"content\":\"Содержимое второй статьи\"}]}");
Answer the question
In order to leave comments, you need to log in
If you insert the output from the template (through {{.}}) in the body tags, then everything is displayed on the page as it should
{"art_slice":[{"title":"Заголовок","content":"Содержимое статьи"},{"title":"Заголовок второй статьи","content":"Содержимое второй статьи"}]}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question