How to Parse JSON in Feedzilla API

945 Views Asked by At

Hi am working on FeedZilla API for data access in JASON format. I am getting the response but unable to show it. Here is my code.

<script type="text/javascript">
    $(document).ready(function() 
    {
        $.ajax({
                //url:"http://api.feedzilla.com/v1/categories/26/articles/search.json?q=Michael",
                url:"http://api.feedzilla.com/v1/categories/26/articles.json",
                type:'GET',
        //      data:'value='+value+'/'+sid,
                dataType:'json',

                       error: function()
                {
                    alert('Error loading Data.');
                    //LOADER.hide(2000);
                },

                success: function(rs)
                {
                     jQuery("#unclockcodersource").html(Object(url));
                     //LOADER.hide(2000);

                } 
             });
    });
</script>
<div id="unclockcodersource"></div>

I want to show this data and save the data in the database.

2

There are 2 best solutions below

0
On

Try

jQuery("#unclockcodersource").text(rs);

0
On

Try this to get particular attributes from JSON

    success: function(rs)
    {
        $.each(rs.articles, function(index, ele){
            alert(this.author);
        });
    }

or else

    success: function(rs)
    {
        $.each(rs.articles, function(index,ele){
            alert(ele.author);
        });
    }