I've just recently started getting into some ajax, and I'm trying to figure out how to pull data from a website using jsonp. I'm trying to pull the jQuery github account information and display it in the browser. The only problem being I keep receiving an undefined for the two values I am trying to pull out of each array in the json data. When I go to the console to error check, I can clearly see all of the json data file information.Another thing is that while there are many different entries, the each loop only does two iterations before it stops printing. My jQuery code is below.
var url = 'https://api.github.com/users/jquery/repos';
$('#letter-h a').click(function(event){
event.preventDefault();
$.getJSON(url + '?callback=?', function(data){
var html = '';
$.each(data, function(entryIndex, entry){
html += '<div class="entry">';
html += '<h3 class="term">' + entry.id + '</h3>';
html += '<div class="part">' + entry.name + '</div>';
html += '</div>';
});
$('#dictionary').html(html);
});
});
I have looked through many different questions on this site (as this question apparently gets asked often) to try to assist but none of the suggestions have worked. This includes entry[entryIndex].id, data.entry.id, data.id.