Ajax 从JSON返回的数据中提取文章标题

Ajax 从JSON返回的数据中提取文章标题,ajax,json,jquery-mobile,Ajax,Json,Jquery Mobile,我不知道这为什么不起作用。我想在我的博客页面上显示文章标题,但我没有看到任何显示的对象。这是我的代码: $(document).on('pagebeforeshow', '#blogposts', function() { //$.mobile.showPageLoadingMsg(); $.ajax({ url: "http://howtodeployit.com/category/daily-d

我不知道这为什么不起作用。我想在我的博客页面上显示文章标题,但我没有看到任何显示的对象。这是我的代码:

    $(document).on('pagebeforeshow', '#blogposts', function() {     
        //$.mobile.showPageLoadingMsg();    
            $.ajax({
                url: "http://howtodeployit.com/category/daily-devotion/?json=recentstories&callback=",
                dataType: "json",
                jsonpCallback: 'successCallback',
                async: true,
                beforeSend: function() { $.mobile.showPageLoadingMsg(true); },
                complete: function() { $.mobile.hidePageLoadingMsg(); },
                success:function(data){

                console.log(data.posts);
                alert (data.posts.length);

                 },
                error: function (request,error) {
                alert('Network error has occurred please try again!');
            }
        });
    });
这是我的控制台显示的内容:

[Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object]
0: Object
1: Object
2: Object
3: Object
4: Object

展开第一个对象时,我会看到所需的不同元素。如何向下展开每个对象以获得所需的输出。

这些也是对象,请尝试遍历它们:

console.log(data.posts);
for (var i = 0; i < data.posts.length; i++) {
    //Just the title
    console.log(data.posts[i].title);

    //Iterate all the keys
    for (var key in data.posts[i]) {
        console.log(data.posts[i][key]);
    }
}
console.log(data.posts);
对于(var i=0;i