JSON Data
getJSON fetches and parses JSON. Use it with each to build lists.
Example
$.getJSON('/api/users', function (users) {
$.each(users, function (i, u) {
$('ul').append('<li>' + $('<i>').text(u.name).html() + '</li>');
});
});Exercise
JSON helper.
$.JSON(url)
Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.