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>