I am making an ajax call
$.ajax({
url: urpath,
type: 'POST',
dataType: 'json',
data: JSON.stringify(json),
contentType: 'application/json; charset=utf-8',
success: function (data) {
alert(data);
},
error: error
});
The returning data is a list which has 2 columns. How do I iterate through the list and show the data. When I do alert(data) it just says object object?
Use
for-inloop:So here is how your code should be: