我遇到问题。我需要访问jQuery中数组中的对象。访问json数组中的对象
我的JSON:
{"employ": [
{
"id": 46846,
"name": "some name",
"schedule": "main",
"hours": {
"11.09.2012": 5,
"12.09.2012": 8
}
}
,
{
"id": 3543,
"name": "another name",
"schedule": "main",
"hours": {
"11.09.2012": 9,
"12.09.2012": 7
}
}
]}
而且我的jquery:
$(document).ready(function(){
$("#click").click(function(){
$.getJSON('employ.json', {}, function(json){
$("#userid").append(json.employ[0].hours.????);
});
})
});
我需要用的地方什么码 “????”访问名称为“11.09.2012”的元素?
[成功](http://www.quickmeme.com/meme/3qwpig/) –