• <i id='WKlux'><tr id='WKlux'><dt id='WKlux'><q id='WKlux'><span id='WKlux'><b id='WKlux'><form id='WKlux'><ins id='WKlux'></ins><ul id='WKlux'></ul><sub id='WKlux'></sub></form><legend id='WKlux'></legend><bdo id='WKlux'><pre id='WKlux'><center id='WKlux'></center></pre></bdo></b><th id='WKlux'></th></span></q></dt></tr></i><div id='WKlux'><tfoot id='WKlux'></tfoot><dl id='WKlux'><fieldset id='WKlux'></fieldset></dl></div>

      <tfoot id='WKlux'></tfoot>
    1. <legend id='WKlux'><style id='WKlux'><dir id='WKlux'><q id='WKlux'></q></dir></style></legend>
        • <bdo id='WKlux'></bdo><ul id='WKlux'></ul>

        <small id='WKlux'></small><noframes id='WKlux'>

        Javascript - 获取

        Javascript - fetch(Javascript - 获取)
        <legend id='3kdHS'><style id='3kdHS'><dir id='3kdHS'><q id='3kdHS'></q></dir></style></legend>
      1. <tfoot id='3kdHS'></tfoot>

          • <bdo id='3kdHS'></bdo><ul id='3kdHS'></ul>
              <tbody id='3kdHS'></tbody>
            <i id='3kdHS'><tr id='3kdHS'><dt id='3kdHS'><q id='3kdHS'><span id='3kdHS'><b id='3kdHS'><form id='3kdHS'><ins id='3kdHS'></ins><ul id='3kdHS'></ul><sub id='3kdHS'></sub></form><legend id='3kdHS'></legend><bdo id='3kdHS'><pre id='3kdHS'><center id='3kdHS'></center></pre></bdo></b><th id='3kdHS'></th></span></q></dt></tr></i><div id='3kdHS'><tfoot id='3kdHS'></tfoot><dl id='3kdHS'><fieldset id='3kdHS'></fieldset></dl></div>

              <small id='3kdHS'></small><noframes id='3kdHS'>

                  本文介绍了Javascript - 获取的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我对编程很陌生,但遇到了一个问题.

                  Im quite new to programming and I'm stuck with a problem.

                  这是我的代码:

                           fetch('https://feed.tunein.com/profiles/s9615/nowPlaying')
                          .then(response => response.json())
                          .then(data => console.log(data))
                  

                  这是我得到的回复:

                  {
                    Header: { Title: 'Radio 1', Subtitle: 'BQL - Muza' },       
                    Primary: {
                      GuideId: 's9615',
                      Image: 'http://cdn-radiotime-logos.tunein.com/s9615q.png',
                      Title: 'Radio 1',
                      Subtitle: 'Ve dobre glasbe'
                    },
                    Secondary: {
                      GuideId: 'o0',
                      Image: 'http://cdn-radiotime-logos.tunein.com/s9615q.png',
                      Title: 'BQL - Muza',
                      Subtitle: 'Radio 1',
                      FullScreen: true
                    },
                    Ads: {
                      CanShowAds: true,
                      CanShowPrerollAds: true,
                      CanShowCompanionAds: false,
                      CanShowVideoPrerollAds: false
                    },
                    Echo: {
                      CanEcho: false,
                      EchoCount: 0,
                      TargetItemId: 's9615',
                      Scope: 's9615',
                      Url: '',
                      FeedTag: 's9615'
                    },
                    React: {
                      CanReact: false,
                      TargetItemId: 's9615',
                      Scope: 's9615',
                      Url: 'https://api.radiotime.com/profiles/me/activities?itemToken=BgwMAAAAAAAAAAAAAAABjyUAAAEMAY8lAAABjyUAAA',
                      Reactions: [ [Object], [Object], [Object], [Object], [Object] ]
                    },
                    Donate: { CanDonate: false },
                    Share: { CanShare: true, ShareUrl: 'http://tun.in/selA9' },
                    Follow: { Options: [ [Object], [Object] ] },
                    Record: { CanRecord: false },
                    Classification: {
                      ContentType: 'music',
                      IsEvent: false,
                      IsOnDemand: false,
                      IsFamilyContent: false,
                      IsMatureContent: false,
                      GenreId: 'g141'
                    },
                    Link: { WebUrl: 'http://www.radio1.si/' },
                    Ttl: 18,
                    Token: 'eyJwIjpmYWxzZSwidCI6IjIwMjAtMDQtMjRUMjM6NDA6MTAuNzIwNDY4OVoifQ'
                  }
                  

                  所以我正在尝试提取存储在 Secondary - Title 中的当前播放歌曲.那么如何提取呢?

                  So I'm trying to extract the current playing song which is stored in Secondary - Title. So how could i extract it?

                  感谢您的帮助,也很抱歉我的英语不是我的母语!

                  Thank you for your help and also sorry about my english since it is not my first language!

                  推荐答案

                  代替console.log(data),使用console.log(data.Secondary.Title)

                  然后您可能想要对数据做一些事情,而不是仅仅将其记录到控制台.

                  You will probably then want to do something with the data instead of just log it to the console.

                  这篇关于Javascript - 获取的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Fetch multiple links inside foreach loop(在 foreach 循环中获取多个链接)
                  Backbone Fetch Request is OPTIONS method(Backbone Fetch Request 是 OPTIONS 方法)
                  Fetch API leaks memory in Chrome(Fetch API 在 Chrome 中泄漏内存)
                  How can I download and save a file using the Fetch API? (Node.js)(如何使用 Fetch API 下载和保存文件?(Node.js))
                  Send blob data to node using fetch, multer, express(使用 fetch、multer、express 将 blob 数据发送到节点)
                  Sending a custom User-Agent string along with my headers (fetch)(发送自定义用户代理字符串以及我的标头(获取))
                    <bdo id='wFytn'></bdo><ul id='wFytn'></ul>

                              <tbody id='wFytn'></tbody>
                          1. <legend id='wFytn'><style id='wFytn'><dir id='wFytn'><q id='wFytn'></q></dir></style></legend>

                            <small id='wFytn'></small><noframes id='wFytn'>

                          2. <tfoot id='wFytn'></tfoot>
                          3. <i id='wFytn'><tr id='wFytn'><dt id='wFytn'><q id='wFytn'><span id='wFytn'><b id='wFytn'><form id='wFytn'><ins id='wFytn'></ins><ul id='wFytn'></ul><sub id='wFytn'></sub></form><legend id='wFytn'></legend><bdo id='wFytn'><pre id='wFytn'><center id='wFytn'></center></pre></bdo></b><th id='wFytn'></th></span></q></dt></tr></i><div id='wFytn'><tfoot id='wFytn'></tfoot><dl id='wFytn'><fieldset id='wFytn'></fieldset></dl></div>