javascript - Tidal Info Retrieve -
i novice , need help.
the next part of json info noaa tidal api. t stands time , contains date , time. v stands water level.
{ "predictions" : [ { "t":"2014-11-05 00:00", "v":"0.183" }, { "t":"2014-11-05 00:06", "v":"0.202" }, the info continues every 6 minute.
what want show high/low tides (highest v , lowest v) , associated time. each high/low tide happens twice day (twelve hr cycle), need retrieve 2 highest values , 2 lowest values each day.
please help me!
you can seek using underscorejs.
e.g max value:
_.max(data['predictions'] , function(prediction) { homecoming prediction.v }); javascript arrays json tidal-scheduler
No comments:
Post a Comment