Skip to content

Instantly share code, notes, and snippets.

@jamespenguin
Created October 3, 2014 01:25
Show Gist options
  • Save jamespenguin/d84d96935ede98c8c33d to your computer and use it in GitHub Desktop.
Save jamespenguin/d84d96935ede98c8c33d to your computer and use it in GitHub Desktop.
require 'json'
require 'awesome_print' # this is an external gem and you'll need to install it with the command "gem install awesome_print"
file_path = "monster_cards.json"
data = JSON.parse File.read file_path
card_name = "Raigeki"
ap data["R"][card_name] # If you have awesome print
puts data["R"][card_name] # If you don't have awesome print
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment