Skip to content

Instantly share code, notes, and snippets.

@sweemeng
Created August 31, 2010 03:27
$(function(){
$.getJSON('/contacts/',
function(data){
$.each(data,function(index,item){
tr = '<tr><td>'+ item.fields.name+'</td>';
tr += '<td>' + item.fields.phone+'</td>';
tr += '<td>' + item.fields.address+'</td>';
tr += '<td>' + item.fields.post_code+'</td>';
tr += '</tr>';
$('#contact_table').children('tbody').append(tr);
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment