小编mun*_*nch的帖子

如何在JSON中选择具有未知名称的第一个属性和数组中的第一个项目

我实际上有两个问题,两个都可能很简单,但由于一些奇怪的原因我无法弄明白......我之前也曾使用JSON 100次!但这里是有问题的JSON:

{"69256":{
   "streaminfo":{
     "stream_ID":"1025",
     "sourceowner_ID":"2",
     "sourceowner_avatar":"http:\/\/content.nozzlmedia.com\/images\/sourceowner_avatar2.jpg",
     "sourceownertype_ID":"1",
     "stream_name":"Twitter",
     "streamtype":"Social media"
     "appsarray":[]
   },
   "item":{
      "headline":"Charboy",
      "main_image":"http:\/\/content.nozzlmedia.com\/images\/author_avatar173212.jpg",
      "summary":"ate a tomato and avocado for dinner...",
      "nozzl_captured":"2010-05-12 23:02:12",
      "geoarray":[{
         "state":"OR",
         "county":"Multnomah",
         "city":"Portland",
         "neighborhood":"Downtown",
         "zip":"97205",
         "street":"462 SW 11th Ave",
         "latitude":"45.5219",
         "longitude":"-122.682"
       }],
       "full_content":"ate a tomato and avocado for dinner tonight. 
                      such tasty foods. just enjoyable.",
       "body_text":"ate a tomato and avocado for dinner tonight. 
                      such tasty foods. just enjoyable.",
       "author_name":"Charboy",
       "author_avatar":"http:\/\/content.nozzlmedia.com\/images\/author_avatar173212.jpg",
       "fulltext_url":"http:\/\/twitter.com\/charboy\/statuses\/13889868936",
       "leftovers":{
           "twitter_id":"tag:search.twitter.com,2005:13889868936",
           "date":"2010-05-13T02:59:59Z",
           "location":"iPhone: 45.521866,-122.682262"
       },
       "wordarray":{
          "0":"ate",
          "1":"tomato",
          "2":"avocado",
          "3":"dinner",
          "4":"tonight",
          "5":"tasty", …
Run Code Online (Sandbox Code Playgroud)

javascript arrays jquery json

4
推荐指数
1
解决办法
6441
查看次数

标签 统计

arrays ×1

javascript ×1

jquery ×1

json ×1