Skip to content

Instantly share code, notes, and snippets.

@tblachowicz
Created May 27, 2011 09:46
Show Gist options
  • Save tblachowicz/994958 to your computer and use it in GitHub Desktop.
Save tblachowicz/994958 to your computer and use it in GitHub Desktop.
<script>
$(document).ready(function() {
$("#json-button").click(function() {
$.getJSON('/temp/jsontest', function(data) {
var items = [];
for (employee in data.employees) {
items.push(employee.fullname + '<' + employee.email + '>');
}
alert('Employees: ' + items.join(', '));
});
});
});
</script>
<form>
<input id="json-button" type="button" value="get me some json">
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment