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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T08:01:10+00:00 2026-06-16T08:01:10+00:00

I am trying to parse data from Google plus API. I want to display

  • 0

I am trying to parse data from Google plus API. I want to display user profile name and profile image. Here is what I have so far:

<div class="gplus-data"></div>
<script> 
    $(document).ready(function() {
        $(function () { 
            $.getJSON( "https://www.googleapis.com/plus/v1/people/113411411661448774142?fields=displayName%2Cimage&key=AIzaSyC_f6bGDJ54pkibdZ1hfiQo3-ekJs_btr8",
                    function (data) {   
                $('.gplus-data').append('<tbody class="items"></tbody>');
                $('.gplus-data tbody').prepend('<tr><th>Name</th><th>Image</th></tr>'); 
                $.each(data.items, function(i,item){    
                    var item = '<td>' + item.displayName + '</td>'; 
                    item += '<td>' + item.image.url + '</td>';
                    $('.items').append('<tr>' + item + '</tr>');    
                });
            });
        });
    });
</script>

http://jsfiddle.net/yrrqd/1/

  • 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-16T08:01:11+00:00Added an answer on June 16, 2026 at 8:01 am

    Several issues, first the simple ones is you are trying to add table components to a DIV.

    $(function () {}) is the same as $(document).ready(function() {}) so it doesn’t make sense to wrap one in the other

    Next is the data is not in the format you are trying to parse. Your code is assuming the response is an array, however the url provided returns an object.

    This will work if you change DIV to table:

    $(function() {
        $.getJSON(url, function(data) {      
            $('.gplus-data').append('<tbody class="items"></tbody>');
            $('.gplus-data tbody').prepend('<tr><th>Name</th><th>Image</th></tr>');            
                var item = '<td>' + data.displayName + '</td>';
                item += '<td><img src="' +data.image.url + '"></td>';
                $('.items').append('<tr>' + item + '</tr>'); 
        });    
    });
    

    DEMO: http://jsfiddle.net/NsfPH/

    Do you really want your API key exposed?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to parse profile name and profile image from Google+ API. I
I am trying to parse some data from json file while using google api
I am trying to parse the data I get from http://www.google.com/ig/api?weather=bangalore by using this
I'm trying to parse some JSON data from the Google AJAX Search API. I
I'm trying to parse some XML I've gotten from the Google Data Booksearch API
I'm trying to parse data from the web, basically, from an API (Google Finance
I'm trying to parse the JSON data from the Rotten Tomatoes API using GSON
I am trying to parse out some information from Google's geocoding API but I
I'm trying to get the weather data from googles weather api and parse the
I'm trying to parse json data from google directions but can't seem to access

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.