Well, I'm pretty new to javascript and would like to know how to do the API call in JS and then I need a loop to list calls, they're in array in json. Can someone help me with this question?
code that I'm using to call the API
function listAtendimento() {
let body = '{"msg": "" }'
$.ajax({
url: "link da api",
type: 'post',
dataType: 'json',
data: body,
contentType: "application/json; charset=utf-8",
success: function (data) {
}
});
}