gpt4 book ai didi

javascript - jquery JSON url解析问题

转载 作者:行者123 更新时间:2023-11-28 13:32:20 25 4
gpt4 key购买 nike

我需要解析 iTunes url 并显示数据。我在解析时遇到问题,任何知道如何执行此操作的人都可以在 jQuery ajaxjs 中解析以下网址吗?

我尝试了很多,但出现了未定义的错误。

function onDeviceReady() {
// Now safe to use device APIs
var flickerAPI = "https://itunes.apple.com/in/rss/topalbums/limit=10/json";
$.getJSON(flickerAPI, { format: "json" })
.done(function(data) {
$('#your-tweet').append('<li>'+data);
});
}

最佳答案

flickerAPI = "https://itunes.apple.com/in/rss/topalbums/limit=10/json"; 
$.getJSON(flickerAPI,{ format: "json" }).done(function(data)
{
alert(data.feed.entry[0]["im:name"].label);
});

fiddle 位于http://jsfiddle.net/YGbx7/1/

关于javascript - jquery JSON url解析问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23995132/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com