开发者社区> 问答> 正文

关于jquery如何读取json对象

代码如下:

{
"A": [
{
"id": "123",
"name": "小白",
"adress": "广州",
"sex": "male",
"AA": [
{
"id": 1,
"name": "兔子",
"email": "cccddd"
},
{
"id": 2,
"name": "二狗子",
"email": "aaabbb"
},
{
"id": 3,
"name": "刘能",
"email": "eeefff"
}
]
},
{
"id": "321",
"name": "小黑",
"adress": "加拿大",
"sex": "female",
"AA": [
{
"id": 4,
"name": "狗剩子",
"email": "xxxxx"
}
]
},
{
"id": "39f6dcc3be414fbd84fdc0a2f27c5f3c",
"name": "大黄",
"adress": "上海",
"sex": "male",
"AA": [
{
"id": 5,
"name": "狗蛋",
"email": "aaa"
},
{
"id": 6,
"name": "存存",
"email": "tttt"
}
]
}
],
"B": [],
"C": []
}

展开
收起
吴孟桥 2016-05-31 02:34:32 1797 0
1 条回答
写回答
取消 提交回答
  • var o=你那串字符。
    var A=o.A,AA=A.AA;//数组。自己for遍历

    2019-07-17 19:21:09
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
Javascript中的对象 立即下载
Javascript中的函数 立即下载
JavaScript函数 立即下载