Get the response data into the jQuery ajaxComplete function
ajax, jquery
Solution
You can convert to JSON inside your ajaxComplete function by using
$.parseJSON(xhr.responseText);
Problem
What I would like to do is send the return data from any ajax call and also have it available in the `ajaxComplete` function. So when I have a `$.post` or `$.get` or `$.getJSON` and so on request like this: ``` $.post(url, options, function(DATA) { $('output').html(DATA); }); ``` I also want to get the same data into: ``` $.ajaxComplete(function(event, XMLHttpRequest, ajaxOptions) { // do something with DATA that is returned by the ajax request alert(DATA); }); ``` It means I want in the global `ajaxComplete` function also the same data which I get when I call one of the ajax functions.