在初始Ajax POST调用之后传递Ajax GET响应

I am trying to do a second ajax call when initial ajax post is done, the initial call is a Post and the second call is a get type, on the second call I am able to get the values of url file.php but can't use the returned value as a condition condition parameter.

here's a copy of the js:

$.ajax({
    type: 'POST',
    url: $(form).attr('action'),
    data: formData,
    async: false,
    cache: false,
    contentType: false,
    processData: false,
    dataType: 'json'
})
.done(function() {
    //SOME UI UPDATES ARE HAPPENNG HERE
    //SOME OTHER AJAX CALL AFTER INITIAL CALL IS DONE
    $.ajax({
        url: 'progress.php',
        type: 'GET',
        data: status,
        async:false,
        cache:false
    })
    .done(function(response) {
        console.log("success"); // GETS STRING VALUE OF PROGRESS.PHP
        if (response == "success") {
            //DO SOMETHING ELSE
        };
    })
    .fail(function(response) {
        console.log("error");
    });

})
.fail(function() {
    //console.log("error");
    //INITIAL POST ERROR GOES HERE
});

response also contains a new line to the end. Better checking the string contains in this case.

response.indexOf('success') !== -1