I have the following code structure :
var firstPagePromise = $.ajax(\'url1\').then(function (data) { //do st