Skip to content

Instantly share code, notes, and snippets.

@dladowitz
Created March 9, 2015 00:01
Show Gist options
  • Save dladowitz/984c37f280bd9f61cd99 to your computer and use it in GitHub Desktop.
Save dladowitz/984c37f280bd9f61cd99 to your computer and use it in GitHub Desktop.
require 'json'
require 'rest-client'
#get a big block of json
github_json = RestClient.get('https://api.github.com/users/rails/repos')
#format the json for ruby to read
ghub_json = JSON.load(github_json)
#loop over all the repos in the formatted json
ghub_json.each do |repo|
puts repo['created_at']
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment