Skip to content

Instantly share code, notes, and snippets.

@csessig86
Created April 21, 2016 16:52
Show Gist options
  • Save csessig86/1279b95a02cd171152d53f269e7a3647 to your computer and use it in GitHub Desktop.
Save csessig86/1279b95a02cd171152d53f269e7a3647 to your computer and use it in GitHub Desktop.
Making two AJAX calls
var global_data = {};
$.ajax({
type: "GET",
dataType: "json",
url: 'https://datagetter.herokuapp.com/arrests.json',
success: function(data){
global_data = data;
},
complete: function() {
console.log(global_data);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment