{
user: [
{
id: 476,
customer: {
id: "375",
name: "test",
avatar: null,
email: "[email protected]",
phone_number: "",
created_at: "2013-06-19 19:47:54.425111"
},
service: "test",
inst: "N/A",
images: [ ]
}]
}
如何打印上面的JSON在我的jQueryJSON响应
我尝试以下,以获得JSON
$.getJSON('jobs.json', function(data) {
console.log(JSON.stringify(data);
});
这将返回JSON但是当我打印服务它是抛出错误
$.getJSON('jobs.json', function(data) {
console.log(JSON.stringify(data.service[0]);
});
投掷误差
Uncaught TypeError: Cannot read property '0' of undefined
他想打印在警报 –
一个右括号丢失。请编辑。 – Mowji