如何在React js中显示来自对象uri json文件的数据

时间:2019-07-15 14:46:00

标签: reactjs api

我在此json数据中附加一个json数据,有一个名为uri的对象,此uri包含一个json文件,因此,我能够显示原始json文件中的所有数据,但无法从uri中获取数据,该怎么办

[
  {
   "id": 59413,
   "thumbnail": {
    "id": "60255",
    "title": "dornoch-castle-whisky-bar",
    "alt": "dornoch-castle-whisky-bar",
    "url": "https://media-magazine.trivago.com/wp-content/uploads/2019/01/23144800/dornoch-castle-whisky-bar.jpg",
  "courtesy": "",
  "position": "center"
},
"thumbnail_url": "https://media-magazine.trivago.com/wp-content/uploads/2019/01/23144800/dornoch-castle-whisky-bar.jpg",
"slug": "dornoch-castle-scotland-whisky",
"uri": "http://trivago-magazine-work-sample-server.s3-website.eu-central-1.amazonaws.com/dornoch-castle-scotland-whisky.json",
"title": "Dornoch Castle: A Whisky Tasting at One of the World's Most Popular Hotel Bars",
"card_title": "Whisky Tasting at Dornoch Castle in the Scottish Highlands",
"show_publish_date": false,
"date": "January 29th, 2019",
"newsletter_popup": false,
"newsletter_popup_header_image": false,
"taxonomies": {
  "destinations": [
    {
      "name": "Europe",
      "uri": "/destination/international/europe",
      "slug": "europe",
      "term_id": 1384
    }
  ],
  "themes": [],
  "types": [
    {
      "name": "Nature",
      "uri": "/type/nature",
      "slug": "nature",
      "term_id": 1380
    }
  ]
},
"excerpt": "Dornoch Castle has amassed a whisky collection unlike most any other in the world. trivago Magazine Editor, Joe Baur, signs up for their whisky tasting. Video below."

},   {

0 个答案:

没有答案