获得这些ajax值

I have an ajax request that returns the following.

{
"field1":{"label1":"message1"},
"field2":{"lable1":"message1"}
}

How can I reaad the values of "field1" and message1? The problem is that I don't know the names of these labels, so right now they're label1, label2, but it varies.

I'm trying this, but it gives me an object.

for (oneline in response) {
   alert(response[oneline]);
}
查看全部
weixin_33738982
?Briella
2011/03/09 22:30
  • ajax
  • javascript
  • jquery
  • 点赞
  • 收藏
  • 回答
    私信

4个回复