Hi I have following ajax function..
$.ajax({
url: './sales/cat/salesCat'
, target: null
, type: "get"
, dataType: "json"
, data: {
locale: LOCALE
}
, success: function (object) {
$.each(object, function (key, value) {
alert(key + ":" + value);
})
}
});
It returns following output
{
"success": true,
"totalCount": 2,
"data": [
{
"East Division": "Yearly Sales"
"West Division": "Yearly Sales"
}
]
}
Problem is I am trying to read the returned values to use it. When Success function executes and in my alert I get alert message
data:[object Object]
Please let me know how to correct the
$.each(object, function (key, value) {
alert(key + ":" + value);
})
So alert can display for example East Division:Yearly Sales Thanks for your help.