i have a json object and want to enumerate one object in this json object.
$.ajax({
url: requrl,
context: document.body,
success: function(data){
var obj = data['UserPenaltys'];
for (var element in obj) {
alert(element + ": " + obj[element]);
}
}
});
But it always returns only the first object data. What is wrong with my loop?
JSON Object:
data Object { Firstname="Max",Lastname="Mustermann",PenaltyCounter=16,
UserPenaltys Object { Penalty1="1.1", Penalty10="1.1", Penalty11="1.1"}
}
UserPenaltys is what i want ...
Help this???