阅读rss json项目

阅读rss json项目,json,ajax,rss,feed,Json,Ajax,Rss,Feed,嗨,我有这个前端 前端ajaxget $.ajax({ type: "POST", "url": "/getfeed", success: function (response) { console.log(response); $.each(response.items, function (k, item) {

嗨,我有这个前端

前端ajaxget

    $.ajax({
        type: "POST",
        "url": "/getfeed",
        success: function (response) {
            console.log(response);

            $.each(response.items, function (k, item) {
                var imgsrc = item.enclosure.link;
                console.log(imgsrc);
                return k <2;
            });

        }
    });
我想循环每个项目以获取其链接、url、标题、发布日期、作者 尝试

它显示
未捕获类型错误:无法读取未定义的属性“title”

有没有合适的方法读出来

"{

"?xml":{"@version":"1.0","@encoding":"utf-8"},
"rss":{"@version":"2.0",

"channel":
{
"title":"Forex News",

"link":"https://www.investing.com",

"item":[

{"enclosure":{"@url":"https://i-invdn-com.akamaized.net/trkd-images/LYNXNPEF1P0QZ_L.jpg","@length":"120381","@type":"image/jpeg"},"title":"Zimbabwe's new currency unmoved as transactions stay restricted","pubDate":"2019-02-26 10:55:27","author":"Reuters","link":"https://www.investing.com/news/forex-news/zimbabwes-new-currency-unmoved-as-transactions-stay-restricted-1790435"},

{"enclosure":{"@url":"https://i-invdn-com.akamaized.net/news/LYNXMPEB2A0U6_M.jpg","@length":"32491","@type":"image/jpeg"},"title":"Forex - Pound Rises on Brexit Delay Hopes; Dollar Slips Ahead of Powell Testimony","pubDate":"2019-02-26 08:58:00","author":"Investing.com","link":"https://www.investing.com/news/forex-news/forex--pound-rises-on-brexit-delay-hopes-dollar-slips-ahead-of-powell-testimony-1790347"},

{"enclosure":{"@url":"https://i-invdn-com.akamaized.net/news/LYNXNPEC4G0K1_M.jpg","@length":"22583","@type":"image/jpeg"},"title":"Oil Prices Decline Despite Positive U.S.-China Trade News","pubDate":"2019-02-25 04:11:00","author":"Investing.com","link":"https://www.investing.com/news/forex-news/oil-prices-decline-despite-positive-uschina-trade-news-1789005"}]

}}}"
response.channel.item[0].enclosure.url
response.channel.item[0].title
response.channel.item[0].author