求助!js 解析JSON数据 问题?

 
  ajax 调用接口,返回以下格式数据应该怎么处理:
 
[{"room_no":"R201705070001","typeName":"1","room_photo":"room\/Tpl\/public\/photo\/201705070001.png","room_thphoto":"room\/Tpl\/public\/photo\/th_201705070001.png"},{"room_no":"R201705070002","typeName":"1","room_photo":"room\/Tpl\/public\/photo\/201705070001.png","room_thphoto":"room\/Tpl\/public\/photo\/th_201705070001.png"},{"room_no":"R201705070003","typeName":"2","room_photo":"room\/Tpl\/public\/photo\/201705070001.png","room_thphoto":"room\/Tpl\/public\/photo\/th_201705070001.png"}]
已邀请:

launcher - php

赞同来自: 比尔盖茨

var o = eval('(' + data + ')');
for(var a in o){
alert(o[a].room_no);
}

要回复问题请先登录注册