1$.ajax({
2 dataType: "json",
3 url: url,
4 data: data,
5 success: success
6});
7
1{
2 "one": "Singular sensation",
3 "two": "Beady little eyes",
4 "three": "Little birds pitch by my doorstep"
5}
6
1$.getJSON( "ajax/test.json", function( data ) {
2 var items = [];
3 $.each( data, function( key, val ) {
4 items.push( "<li id='" + key + "'>" + val + "</li>" );
5 });
6
7 $( "<ul/>", {
8 "class": "my-new-list",
9 html: items.join( "" )
10 }).appendTo( "body" );
11});
12