We can process data received from ajax call in .then and return altered data from it as below :
function a() { return $.ajax({}) .then(function