Last active
September 14, 2017 12:41
-
-
Save jasonglisson/8e8cbd35e7ea6e0bc48b to your computer and use it in GitHub Desktop.
Json API parse with Javascript - Displays data dump in console.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(document).ready(function($){ | |
var output = document.getElementById("output").value; | |
$(document).ready(function(){ | |
$.ajax({ | |
url:'http://earthquake.usgs.gov/fdsnws/event/1/query?format=geojson&starttime=2015-11-24&endtime=', | |
type:'post', | |
dataType: 'json', | |
data:{ | |
output:output | |
}, | |
success: function(data) { | |
$('#output').val(data); | |
console.log(data); | |
} | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment