我尝试从 php 中获取我所有的 json 对象,但似乎不起作用,我无法从中获取任何数据。
JSON:
[{"courtid":"4","bookingid":"22673","centername":"Copenhagen","time":"8:9","date":"27-8-2013"},{"courtid":"3","bookingid":"22702","centername":"Copenhagen","time":"17:18","date":"27-8-2013"},{"courtid":"4","bookingid":"26422","centername":"Copenhagen","time":"7:9","date":"31-12-2013"},{"courtid":"5","bookingid":"26423","centername":"Copenhagen","time":"7:9","date":"31-12-2013"},{"courtid":"13","bookingid":"26424","centername":"Copenhagen","time":"7:9","date":"31-12-2013"}]
我的 jQuery ajax:
$.getJSON("http://f??????dboldfabrikken.dk/api/index.php?module=getAvailableGames",function(msg){
$.each(msg.courtid,function(index,item){
alert(index + "..."+item);
});
});
代替 ??????带o自己试试。
我需要做什么?