jquery 获取json里面的数据,主要获取rows里面的数据

"total":1,"page":1,"records":8,"costtime":"196.0112","rows":[{"Row":1,"id":38,"title"... "total": 1,
"page": 1,
"records": 8,
"costtime": "196.0112",
"rows": [{
"Row": 1,
"id": 38,
"title": "adsf",
"keyword": "asdf",
"description": "",
"realTitle": "",
"imgSrc": "/goodimage/20170329163544563_01-1.jpg",
"fileSrc": "",
"createTime": "2017-03-29T16:03:10",
"updateTime": "2017-03-29T16:35:46",
"editor": "管理员",
"source": "本站",
"sort": 1,
"hits": 0,
"content": "sadf",
"typeId": 19,
"fine": false,
"view": true,
"role": 1,
"url": "/admin/Net/Https/02_article.ashx",
"a1": "",
"a2": "",
"a3": "",
"a4": "",
"a5": "",
"a6": "",
"a8": "",
"a7": "",
"a10": "",
"a9": "",
"typeIds": "我的产品",
"expanded": "true",
"isLeaf": "false",
"rgt": "9999999",
"lft": "1"
},
展开
 我来答
匿名用户
2017-03-30
展开全部
var data={
"total": 1,
"page": 1,
"records": 8,
"costtime": "196.0112",
"rows": [{
"Row": 1,
"id": 38,
"title": "adsf",
"keyword": "asdf",
"description": "",
"realTitle": "",
"imgSrc": "/goodimage/20170329163544563_01-1.jpg",
"fileSrc": "",
"createTime": "2017-03-29T16:03:10",
"updateTime": "2017-03-29T16:35:46",
"editor": "管理员",
"source": "本站",
"sort": 1,
"hits": 0,
"content": "sadf",
"typeId": 19,
"fine": false,
"view": true,
"role": 1,
"url": "/admin/Net/Https/02_article.ashx",
"a1": "",
"a2": "",
"a3": "",
"a4": "",
"a5": "",
"a6": "",
"a8": "",
"a7": "",
"a10": "",
"a9": "",
"typeIds": "我的产品",
"expanded": "true",
"isLeaf": "false",
"rgt": "9999999",
"lft": "1"
}]
};
$.each(data.rows,function(index,row){
    console.log("第"+row.Row+"行");
    $.each(row,function(k,v){
       console.log(k + "=" + v);
    });
});
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式