我想排序一些参数,但给我[对象对象]或未定义

时间:2017-03-20 11:49:52

标签: javascript jquery json

"text": "Introducing the Twitter Certified Products Program:
"retweet_count": 121, 
"in_reply_to_status_id_str": null, 
"id": 240859602684612608, 
"geo": null, 
"retweeted": false, 
"possibly_sensitive": false, 
"in_reply_to_user_id": null, 
"place": null, 
"user": { 
"profile_sidebar_fill_color": "DDEEF6", 
"profile_sidebar_border_color": "C0DEED", 
"profile_background_tile": false, 
"name": "Twitter API", 
"profile_image_url": "http://a0.twimg.com/profile_images/2284... 
"created_at": "Wed May 23 06:01:13 +0000 2007", 
"location": "San Francisco, CA", 
"follow_request_sent": false, 
"profile_link_color": "0084B4", 
"is_translator": false, 
"id_str": "6253282", 
"entities": {
        "url": {
          "urls": [
            {
              "expanded_url": null,
              "url": "",
              "indices": [
                0,
                22
              ]
            }
          ]
        },
        "description": {
          "urls": [

          ]
        }
      },

jquery

success: function(data) { 
var result = JSON.parse(data);  $.each(result, function (i, val) {  
document.write(val.text+" "+val.retweet_count+" 
"); 
}); 

1 个答案:

答案 0 :(得分:0)

" text":"推出Twitter认证产品计划: 它应该是:

" text":"推出Twitter认证产品计划:",

你错过了一个"和一个逗号。