jquery遍历数组,获取数组中的值
objList":[{"lastviewtime":"2016-06-2210:04:17","addtime":"2016-06-2010:28:55","newwor...
objList": [
{
"lastviewtime": "2016-06-22 10:04:17",
"addtime": "2016-06-20 10:28:55",
"newword": "何",
"userid": "UNKNOWN",
"autorecword": "何",
"viewtimes": 4,
"reccorrectly": "Y"
},
{
"lastviewtime": "2016-06-22 09:47:52",
"addtime": "2016-06-20 10:24:51",
"newword": "我",
"userid": "UNKNOWN",
"autorecword": "我",
"viewtimes": 82,
"reccorrectly": "Y"
},
{
"lastviewtime": "2016-06-22 09:27:20",
"addtime": "2016-06-22 08:54:54",
"newword": "李奥我的",
"userid": "UNKNOWN",
"autorecword": "李奥我的",
"viewtimes": 16,
"reccorrectly": "Y"
}
]
如上图代码 我想获取其中的“newword”的值 求大神指点 新手一枚。 展开
{
"lastviewtime": "2016-06-22 10:04:17",
"addtime": "2016-06-20 10:28:55",
"newword": "何",
"userid": "UNKNOWN",
"autorecword": "何",
"viewtimes": 4,
"reccorrectly": "Y"
},
{
"lastviewtime": "2016-06-22 09:47:52",
"addtime": "2016-06-20 10:24:51",
"newword": "我",
"userid": "UNKNOWN",
"autorecword": "我",
"viewtimes": 82,
"reccorrectly": "Y"
},
{
"lastviewtime": "2016-06-22 09:27:20",
"addtime": "2016-06-22 08:54:54",
"newword": "李奥我的",
"userid": "UNKNOWN",
"autorecword": "李奥我的",
"viewtimes": 16,
"reccorrectly": "Y"
}
]
如上图代码 我想获取其中的“newword”的值 求大神指点 新手一枚。 展开
2个回答
2016-06-22 · 百度知道合伙人官方认证企业
育知同创教育
1【专注:Python+人工智能|Java大数据|HTML5培训】 2【免费提供名师直播课堂、公开课及视频教程】 3【地址:北京市昌平区三旗百汇物美大卖场2层,微信公众号:yuzhitc】
向TA提问
关注
展开全部
for(var i=0,l=objList.length;i<l;i++){
for(var key in objList[i]){
alert(key+’:'+json[i][newword]);
}
}
for(var key in objList[i]){
alert(key+’:'+json[i][newword]);
}
}
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2016-06-22
展开全部
$.each(objList,function(data,i){
alert(data.newword);
});
alert(data.newword);
});
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询