怎么读取解析json

浏览:3550 发布日期:2017/10/29 分类:求助交流 关键字: json ajax
json的结构是这样的{
    "total": 113,
    "per_page": 20,
    "current_page": 1,
    "last_page": 6,
    "data": [
        {
            "id": 1,
            "title": "文章1",
        }
        {
            "id": 2,
            "title": "文章2",
        }
        {
            "id":3,
            "title": "文章3",
        }
    ]
}
ajax代码$.each(json, function(index,values){
     alert(index);
 });
这样无法输出,要怎么样才能读取到data这一栏的文章id和标题呢
最佳答案
评论( 相关
后面还有条评论,点击查看>>