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 6884591
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:31:42+00:00 2026-05-27T05:31:42+00:00

I found a jquery function online that i then tweaked a little, but it

  • 0

I found a jquery function online that i then tweaked a little, but it takes a youtube channels feed data and turns it into a json object. It then stores data from the objects arrays. I need to store extra data that IS given, but I dont know how to display the data so I can see the data in its arrays. Im sure this sounds confusing and that is because I dont know about json objects or how to print out the data in jquery. Ive done it before in php with the print function I believe.

This is the function mentioned:

$j(function() {
    $j.getJSON('http://gdata.youtube.com/feeds/users/iCallOfDutyFILMS/uploads?orderby=published&alt=json-in-script&callback=?&max-results=1', function(data) {
        $j.each(data.feed.entry, function(i, item) {
            var updated = item.updated;
            var url = item['media$group']['media$content'][0]['url'];
            var thumb = item['media$group']['media$thumbnail'][0]['url'];
            var numViews = item['yt$statistics']['viewCount'];
            //var vidDescription = item[''][''];
            var width = 710; //only change this number
            var height = width*9/16;
            //...rest left out...

        });
    });
});

I want to print out the array to see how to grab the video description. I just dont know the path to it through the array. Is there a way in jquery to print out the arrays similar to how I was able to in php?

  • 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-05-27T05:31:43+00:00Added an answer on May 27, 2026 at 5:31 am

    In Chrome or Firefox, Press F12, This will bring up the Inspector. Click on ‘Console’ to show the console window.

    Now in your javascript code, whatever variable or object you want to print or ‘inspect’. Pass it into the console log method.

    var your_array_variable = "a string variable";  
    console.log(your_array_variable); //<-- This is what you want to do!
    

    Now refresh the page and run the event or function that you are building.

    Voila!… In your console window you should see >Object (If you print a Object).

    Or in the example above.. You would see a string variable in the console.

    Click on the expand tree node, (>) to view the object/variables details.

    You can console.log almost anything!.. Its a great way to learn whats going on.

    You can also set ‘breakpoints’, but this is a whole other question!..

    I think what your looking for is:

    console.log(data); // To show the JSON data received


    Update
    Try this, It worked for me, in console you will see 2 objects you can click on and inspect. The first is the data from the json request, the second is the item looped in the $.each.
    This worked for me, On click of anything with the id="get_json". This will make the request, and log the response to the console.

        $('#get_json').click(function(e){
            e.preventDefault();
            $(function() {
                var json_url = 'http://gdata.youtube.com/feeds/users/iCallOfDutyFILMS/uploads?orderby=published&alt=json-in-script&max-results=1&callback=?';
                $.getJSON(json_url, function(data) {
                    console.log(data); // Here we log to our console
                    $.each(data.feed.entry, function(i, item) {
                        console.log(item); // This is what you want i think
                        var updated = item.updated;
                        var url = item['media$group']['media$content'][0]['url'];
                        var thumb = item['media$group']['media$thumbnail'][0]['url'];
                        var numViews = item['yt$statistics']['viewCount'];
                        //var vidDescription = item[''][''];
                        var width = 710; //only change this number
                        var height = width*9/16;
                        //...rest left out...
    
                    });
                }).success(function() { alert("success"); })
                // Errors are your friend!.. Use them..
                  .error(function(jqXHR, textStatus, errorThrown) {
                            console.log("error " + textStatus);
                            console.log("error throw " + errorThrown);
                            console.log("incoming Text " + jqXHR.responseText);
                        }) // End of .error
                  .complete(function() { alert("complete"); });
                });
            });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have done various tests and I have found that the jQuery validate function
I have found jQuery: FadeOut then SlideUp and it's good, but it's not the
I have not found what is the use of jquery function data() . Can
Anyone ever found a jQuery hide() easing function that can go to certain X
i found http://visualjquery.com/ more useful when i was learning jQuery with each function explained
I'm learning JQuery and have found the factory function $() with its selectors quite
I found this jquery plugin which does exactly what I need, but I want
i found a spotlight plugin for Jquery, but it is not functional in IE.
I'm looking for a jQuery function or plugin that serializes form inputs to an
We found a JQuery plugin called FixedTable that is used to add scroll bars

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.