Last active
August 28, 2015 09:47
-
-
Save lukebyrne/e45bc0059e9e6f1ba758 to your computer and use it in GitHub Desktop.
This file contains 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 'yaml' | |
require 'pp' | |
require 'json' | |
json = '{"australia":["some", "wines"]}' | |
regions = JSON.parse(json) | |
results = {} | |
regions.each do |key, value| | |
results[value] = 1 | |
end | |
p results | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment