1
我尝试开发一个小网站日历。用户获得一周的概述,如果他推送“下周展示我”,那么接下来的7天应该使用jQuery异步加载。 JSON数据如下所示:如何解析与jQuery的大JSON?
{
"user":[
{
"id":"12345",
"days":{
"09-07-2012":{
"10:00":{
"time":"10:00",
"length":"30",
"appointmentid":"159487"
},
"11:00":{
"time":"11:00",
"length":"30",
"appointmentid":"159487"
},
"12:00":{
"time":"12:00",
"length":"30",
"appointmentid":"159487"
}
},
"10-07-2012":{
"10:00":{
"time":"10:00",
"length":"30",
"appointmentid":"159487"
},
"11:00":{
"time":"11:00",
"length":"30",
"appointmentid":"159487"
},
"12:00":{
"time":"12:00",
"length":"30",
"appointmentid":"159487"
}
},
"11-07-2012":{
"10:00":{
"time":"10:00",
"length":"30",
"appointmentid":"159487"
},
"11:00":{
"time":"11:00",
"length":"30",
"appointmentid":"159487"
},
"12:00":{
"time":"12:00",
"length":"30",
"appointmentid":"159487"
}
}
}
}
]
}
我如何处理这些数据并将其显示在html表中?使用jQuery功能我只能走抛出第二维...所以我只能得到ID和天...
$.each(data.user, function(i,data){
...
}
所以我怎么能走扔掉整个数组,并填写我的用户界面与数据?我应该使用嵌套的每个功能?
电贺 托马斯