问题描述:

below is the json response which i'm getting,

{

"day": ["Thursday", "Friday", "Saturday", "Sunday"],

"date": ["03-01-2012", "03-02-2012", "03-03-2012", "03-04-2012"]

}

i want to parse it for day and date differently.

网友答案:

The success function is something like this, yes?

success: function(data) { // data represents here the ajax json response
  var days = data.day;
  var dates = data.date;
  // Here loop through them, or do anything else you like
}

Basically you can treat JSON responses just like any Javascript object.

相关阅读:
Top