0
我從我的PHP Web服務接收JSON像這樣:YUI3和JSON的foreach
{"success":false,"
errors":{"x":"y"}
}
我通過errors
陣列試圖循環:
var data = Y.JSON.parse(response.responseText); //Parse the JSON above
Y.Array.each(data.errors, function(item, index){
Y.log(item); //No Log in my console
});
的問題是,提供給函數each
永遠不會執行。
我在做什麼錯?