Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7884777
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:53:36+00:00 2026-06-03T04:53:36+00:00

http://jsfiddle.net/Pd2cp/2/ as in the jsFiddle above you’ll see only one label is returned per

  • 0

http://jsfiddle.net/Pd2cp/2/

as in the jsFiddle above you’ll see only one label is returned per post when there are many.
i am using the below jquery. how can i return ALL labels for EACH post. and just as reference i got alot of info from here

$.ajax({
    url: 'http://www.blogger.com/feeds/2814965631975331659/posts/default?alt=json-in-script&max-results=8',
    type: 'get',
    dataType: "jsonp",
    success: function(data){
        for (var i = 0; i < data.feed.entry.length; i++){
        var title = data.feed.entry[i].title.$t;
        for(var j = 0; j < data.feed.entry[i].category.length; j++){
        var categories = data.feed.entry[i].category[j].term;
        }
        $('#blogContainer').append(title+'<br/>'+categories+'<br/><br/>');
        }
    }
});​
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T04:53:37+00:00Added an answer on June 3, 2026 at 4:53 am

    In your loop that goes through the categories, you were assigning the category values to the same variable var category, where it gets overwritten in every loop. What you need to do is have a category array that collects the category labels.

    Here’s the working code:

    $.ajax({
        url: 'http://www.blogger.com/feeds/2814965631975331659/posts/default?alt=json-in-script&max-results=8',
        type: 'get',
        dataType: "jsonp",
        success: function(data){
            for (var i = 0; i < data.feed.entry.length; i++){
                var title = data.feed.entry[i].title.$t;
                var categories = []; // collect categories here
                for(var j = 0; j < data.feed.entry[i].category.length; j++){
                    categories.push(data.feed.entry[i].category[j].term); // append the label to the category collection
                }
            $('#blogContainer').append(title+'<br/>'+ categories.join(', ') +'<br/><br/>');
            }
        }
    });​
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

http://jsfiddle.net/FS4zT/ If you visit the above link you see what am describing below. Summary:
http://jsfiddle.net/YaMhn/8/ ^^^^Take a look and see if you can help solve this Ok so
http://jsfiddle.net/defencedog/2Skc7/ I am trying to remove the online class ONLY for administration which has
http://jsfiddle.net/9BCrs/2/ With respect to the above fiddle how could I use different links in
http://jsfiddle.net/s6Umb/ I'm getting this strange behavior where when I create a datepicker, there appears
http://jsfiddle.net/KYDPd Is there a way to make the minimum number be 0, and not
http://jsfiddle.net/KKL5G/ Please take a look at the above html and css for the buttons.
http://jsfiddle.net/gUckp/ In the above demo, I'd like to show an orange round image BELOW
http://jsfiddle.net/bSnaG/ In my mind the above example should look like a grey box with
http://jsfiddle.net/nicktheandroid/ape5U/ There's 2 or 3 things I need help with, if you can help

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.