How to take the return value of the function

Asked

Viewed 50 times

0

How to take a certain function return value.

I would like to get the Status value.

 $.ajax(settings).done(function (response) {
            console.log(response);
}

inserir a descrição da imagem aqui

  • already tried Sponse.Payment.Status?

  • This seems to be asynchronous, soon the idea of "return" falls apart, because there is no way to return a value if it will only be obtained in 5 seconds or 1 minute. If you show what you’re really trying to do, it’ll be easier to help

  • @aa_sp Opa your tip worked, I was only trying with Payment.Status, Valeu man.

  • blza @Renato left as an answer to facilitate ;)

1 answer

0


I’ll leave it here as an answer to make it clearer:

 $.ajax(settings).done(function (response) {
            console.log(response);
            console.log(response.Payment.Status);
}

Browser other questions tagged

You are not signed in. Login or sign up in order to post.