-1

贝娄 JSON 包含我的 json 格式的粉丝页面信息。我在 jquery 中尝试了 getJson,但它对我不起作用

{
       "about": " One who does something \n\n",
       "description": "Doers Web development\nDoers Software Development\nDoers Graphics design\nDoers Hardware & Networking\nDoers Mobile Application Development",
       "is_published": true,
       "location": {
          "street": "",
          "city": "Colombo",
          "country": "Sri Lanka",
          "zip": ""
       },
       "phone": "+94773633412",
       "talking_about_count": 686,
       "username": "DoersIncorporation",
       "website": "http://www.doers.lk",
       "were_here_count": 0,
       "category": "Computers/technology",
       "id": "397319800348866",
       "name": "Doers Inc",
       "link": "https://www.facebook.com/DoersIncorporation",
       "likes": 767,
       "cover": {
          "cover_id": 398352273578952,
          "source": "http://sphotos-f.ak.fbcdn.net/hphotos-ak-snc7/s720x720/484190_398352273578952_36222530_n.png",
          "offset_y": 0
       }
    }

我想知道的是如何使用 php 和 jquery 从中解析封面图像???

4

1 回答 1

1

将 JSON 保存到变量中:

var x = theJSON

x.cover.source

将返回网址

小提琴

于 2012-12-14T04:52:18.087 回答