Skip to content

Instantly share code, notes, and snippets.

@joeyoun9
Last active March 23, 2021 09:41
Show Gist options
  • Save joeyoun9/7374858 to your computer and use it in GitHub Desktop.
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
$.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