从PHP循环AJAX响应

I want to loop ajax response

response = [
             ["u.profile"],
             ["r.useractivity"],
             ["i.items_job"],
             ["i.setup"],
             ["search"],
             ["i.items_assortment"]
]

I want data = u.profile; data = r.useractivity; etc

Tried Method :

$.each(response,function(key,value){
    console.log(key+":"+value);
});

Getting error in console

Uncaught TypeError: Cannot use 'in' operator to search for 'length' in [["u.profile"],["r.useractivity"],["i.items_job"],["i.setup"],["search"],["i.items_assortment"]]

查看全部
weixin_33749242
weixin_33749242
2015/07/09 20:15
  • response
  • php
  • ajax
  • 点赞
  • 收藏
  • 回答
    私信

1个回复