As you can see the problem from the title. Here is what I do:
send a request like
$.ajax({
type: "POST",
url: "http://www.example.com/api/",
data: {
'data': '1',
'beacon': 'fried'
},
complete: function(res) {
//need help here...
}
});
The API does echo.
If I do document.forms["myform"].submit();
page shows a JSON response like
{
"data": [{
"Chief": "Max",
"temperature": "65",
"done": "yes",
"cost": 24
}]
}
So how should I parse (check, display the values)? Tried many ways.
Any help would be appreciated !
P.S. using jquery-3.2.1.min.js