Skip to content

Instantly share code, notes, and snippets.

@qpfiffer qpfiffer/s.cr
Created Oct 6, 2017

Embed
What would you like to do?
require "json"
string = %({"coord":{"lon":-79.66,"lat":43.58},"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04d"}],"base":"stations","main":{"temp":292.49,"pressure":1017,"humidity":63,"temp_min":291.15,"temp_max":294.15},"visibility":24140,"wind":{"speed":3.6,"deg":150},"clouds":{"all":90},"dt":1507320000,"sys":{"type":1,"id":3722,"message":0.004,"country":"CA","sunrise":1507288997,"sunset":1507330127},"id":6075357,"name":"Mississauga","cod":200})
value = JSON.parse(string)
puts value["main"]["temp"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.