minjiaren
mengchanmian
2009-07-21 17:03

关于JSON循环的问题

  • struts

小弟做了个struts2.1.6和JSON插件结合的例子.
后台的Action有一个Map的属性.采用jquery1.2.6中的Ajax Post请求.
结合后台返回了类似以下的JSON格式.

{
    "photoMap":
    {"57":
    {"menuid":null,"pattribute":1,"pbigname":"big1248081757843.JPG","pid":57,"pinfo":"不能复制吗?不能复制吗?不能复制吗?","pname":"不能复制吗?","psmaname":"small1248081757843.JPG","ptrname":"DSCF1038.JPG","puptime":"2009-07-20T17:22:38","purlpath":"\/image_per\/200907\/person"},
    "56":
    {"menuid":null,"pattribute":1,"pbigname":"big1248081680531.JPG","pid":56,"pinfo":"不能复制吗?不能复制吗?","pname":"不能复制吗?","psmaname":"small1248081680531.JPG","ptrname":"DSCF1008.JPG","puptime":"2009-07-20T17:21:21","purlpath":"\/image_per\/200907\/person"},
    "62":
    {"menuid":null,"pattribute":1,"pbigname":"big1248082855218.JPG","pid":62,"pinfo":"pattributepattribute","pname":"sfsadf","psmaname":"small1248082855218.JPG","ptrname":"DSCF1011.JPG","puptime":"2009-07-20T17:40:55","purlpath":"\/image_per\/200907\/person"}
    }
}

 

类似Map的一个JOSN格式
请高手帮我循环一下,拿到里面的"Key"和"Value".

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

1条回答

为你推荐

换一换