Last active
March 23, 2021 09:41
-
-
Save joeyoun9/7374858 to your computer and use it in GitHub Desktop.
Read through a returned list of stations from a range parameter request on the Synoptic Mesonet API
This file contains 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
$.getJSON('http://api.synopticdata.com/stations?callback=?', | |
{ | |
// specify the request parameters here | |
state:'ut', | |
status:'active', | |
radius:'40.75,-111.8833,10', | |
token:tkn | |
}, | |
function (data) | |
{ | |
obj = $('<ul />',{class:'list-group'}); | |
for (stn in data['STATION']) | |
{ | |
obj.append($('<li />',{class:'list-group-item'}).html(data['STATION'][stn]['STID']+': '+data['STATION'][stn]['NAME'])) | |
} | |
$('#responsediv').append(obj); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment