我可以把元素推向工程阵列。 Consolelog正在返回适当的物体,但是,他们赢得的塔被推到阵列...... 我的守则是:
var works = new Array();
$(window).ready(function()
{
$.getJSON( AJAX/getWorks.php , function(data) {
$.each(data, function(key, val) {
console.log(val);
works.push(val);
});
});
console.log(works);
});
而json则反对:
Object
date: "2012-04-08 17:53:58"
description: "sadasd"
id: "2"
link: "sadasd"
name: "dsad"
objects: null
position: "2"
__proto__: Object
任何人都看到我做了什么错误? 事先得到答复......