Updated:
Many thanks for your reply, I now have this code:
success: function (data) {
$.each(data, function (id, event)
var test = data.approved
if (test == "1") {
alert('approved')
}
);
}
Here is the sample of my JSON:
{"id":"174","title":"John Smith","start":"2013-04-03 00:00:00","end":"2013-04-05 00:00:00","fullname":"John Smith","approved":"1"}, {"id":"175","title":"John Smith","start":"2012-12-25 00:00:00","end":"2012-12-27 00:00:00","fullname":"John Smith","approved":"0"}, {"id":"176","title":"John Smith","start":"2012-12-28 00:00:00","end":"2012-12-28 00:00:00","fullname":"John Smith","approved":"1"}, {"id":"177","title":"John Smith","start":"2012-12-29 00:00:00","end":"2012-12-29 00:00:00","fullname":"John Smith","approved":"0"}, {"id":"178","title":"John Smith","start":"2012-12-21 00:00:00","end":"2012-12-22 00:00:00","fullname":"John Smith","approved":"1"}
Could you please advise as to how I can get the approved alert if the event has been approved in the JSON?
Many thanks once again