-
-
Save qpfiffer/4e36eab675d10d2c9c4c44cbc507fd4c to your computer and use it in GitHub Desktop.
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
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