这样的复杂Json数据怎么样解析呢,向大神求助要,最好能贴下代码,谢谢了!

{"floors":[{"fid":1,"fname":"主层","room":[{"dev":[{"did":1,"devid":1,"cmd":[{"cid":400... {"floors":[{"fid":1,"fname":"主层","room":[{"dev":[{"did":1, "devid":1,"cmd":[{"cid":400,"cname":"电视"},{"cid":401,"cname":"电视"}],"dname":"电视","tid":3},{"did":2, "devid":2,"cmd":[{"cid":402,"cname":"冰箱"},{"cid":403,"cname":"冰箱"}],"dname":"冰箱","tid":3},{"did":3, "devid":3,"cmd":[{"cid":404,"cname":"电暖"},{"cid":405,"cname":"电暖"}],"dname":"电暖","tid":3},{"did":4, "devid":4,"cmd":[{"cid":406,"cname":"风扇"},{"cid":407,"cname":"风扇"}],"dname":"风扇","tid":3},{"did":5, "devid":5,"cmd":[{"cid":408,"cname":"音响"},{"cid":409,"cname":"音响"}],"dname":"音响","tid":3}],"rname":"玄关","rid":1},{"dev":[],"rname":"客厅","rid":2}]},{"fid":2,"fname":"复层","room":[{"dev":[],"rname":"客厅","rid":1},{"dev":[],"rname":"偏厅","rid":2},{"dev":[],"rname":"娱乐室","rid":3}]},{"fid":3,"fname":"厨卫","room":[{"dev":[],"rname":"客厅","rid":1},{"dev":[],"rname":"书房","rid":2},{"dev":[],"rname":"套房","rid":3},{"dev":[],"rname":"主卧","rid":4}]}]}

要求能拿到里面所有"cid"的值。
展开
 我来答
百度网友96ffcf7
2015-04-03 · 知道合伙人互联网行家
百度网友96ffcf7
知道合伙人互联网行家
采纳数:22721 获赞数:118726
从事多年网络方面工作,有丰富的互联网经验。

向TA提问 私信TA
展开全部
什么叫json解析?这个跟json有一毛钱的关系?
你这是ajax校验(验证原密码是否正确)+本地校验(难密码是否一致,是否满足密码的规则)吧。
匿名用户
推荐于2016-04-04
展开全部
var DATA='[{"data":{"x":{"precision":2,"subtype":"","type":"array","unit":" ","value":[-23.93000030517578]},"y":{"precision":2,"subtype":"","type":"array","unit":" ","value":[-8.890000343322754]}},"devtype":"DAIS","msg":"multidata","netid":1128,"nodid":2501,"nvsid":2001181,"version":2}]';
eval(DATA);
本回答被提问者采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

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

类别

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

说明

0/200

提交
取消

辅 助

模 式