How to warn getJSON response in jQuery file?

How to check response of getJSON function call in jQuery file. What function do I need to change?

+3
source share
1 answer

I have to agree with the comments above - your question is more than vague! Therefore, I now only guess what you want:

$.getJSON('ajax/test.json', function(data) {
  alert(JSON.stringify(data));
});

You might need a JSON library for this: http://www.json.org/js.html

+13
source

Source: https://habr.com/ru/post/1786373/


All Articles