更新:
非常感谢您的回复,我现在有这个代码:
success: function (data) {
$.each(data, function (id, event)
var test = data.approved
if (test == "1") {
alert('approved')
}
);
}
这是我的 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","标题":"约翰·史密斯","开始":"2012-12-28 00:00:00","结束":"2012-12-28 00:00:00","全名":"约翰·史密斯" ,"批准":"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","全名":"约翰·史密斯","批准":"1"}
如果事件已在 JSON 中获得批准,您能否告知我如何获得批准的警报?
再次感谢