With this code:
$("#mybutton").click(function(){
$.ajax({
url: '/Member/GetPinPoints/@Model.Id',
type: "POST",
dataType: "json",
contentType: "application/json; charset=utf-8",
success: function(data) {
alert(data);
},
error: function() {
alert("error");
}
});
return false;
});
I am receiving a JSON object that looks like this:
[{"Position":1,"Top":182,"Left":20,"Height":73,"Width":90},{"Position":2,"Top":69,"Left":103,"Height":98,"Width":1}]
How can I iterate through this data, lets say if i wanted to alert each separate value?