操作json数据
[{"id":440,"name":"1单元","famliys":[{"id":441,"floor":1,"name":"101"},{"id":442,"floor":1,"name":"102"},{"id":443,"floor":2,"name":"201"},{"id":444,"floor":2,"name":"202"},{"id":445,"floor":3,"name":"301"},{"id":446,"floor":3,"name":"302"},{"id":447,"floor":4,"name":"401"},{"id":448,"floor":4,"name":"402"},{"id":449,"floor":5,"name":"501"},{"id":450,"floor":5,"name":"502"},{"id":451,"floor":6,"name":"601"},{"id":452,"floor":6,"name":"602"}]},{"id":453,"name":"2单元","famliys":[{"id":454,"floor":1,"name":"101"},{"id":455,"floor":1,"name":"102"},{"id":456,"floor":2,"name":"201"},{"id":457,"floor":2,"name":"202"},{"id":458,"floor":3,"name":"301"},{"id":459,"floor":3,"name":"302"},{"id":460,"floor":4,"name":"401"},{"id":461,"floor":4,"name":"402"},{"id":462,"floor":5,"name":"501"},{"id":463,"floor":5,"name":"502"},{"id":464,"floor":6,"name":"601"},{"id":465,"floor":6,"name":"602"}]},{"id":466,"name":"3单元","famliys":[{"id":467,"floor":1,"name":"101"},{"id":468,"floor":1,"name":"102"},{"id":469,"floor":2,"name":"201"},{"id":470,"floor":2,"name":"202"},{"id":471,"floor":3,"name":"301"},{"id":472,"floor":3,"name":"302"},{"id":473,"floor":4,"name":"401"},{"id":474,"floor":4,"name":"402"},{"id":475,"floor":5,"name":"501"},{"id":476,"floor":5,"name":"502"},{"id":477,"floor":6,"name":"601"},{"id":478,"floor":6,"name":"602"}]},{"id":479,"name":"4单元","famliys":[{"id":480,"floor":1,"name":"101"},{"id":481,"floor":1,"name":"102"},{"id":482,"floor":2,"name":"201"},{"id":483,"floor":2,"name":"202"},{"id":484,"floor":3,"name":"301"},{"id":485,"floor":3,"name":"302"},{"id":486,"floor":4,"name":"401"},{"id":487,"floor":4,"name":"402"},{"id":488,"floor":5,"name":"501"},{"id":489,"floor":5,"name":"502"},{"id":490,"floor":6,"name":"601"},{"id":491,"floor":6,"name":"602"}]}]
以上这个的json数据
怎么用jquery 的each 循环遍历出来呢
求解答
------解决方案--------------------$.each(你的数组,function(){
你的数组里每个数据的操作方法
})
------解决方案--------------------