Check out example codes for "ruby read json file". It will help you in understanding the concepts better.

Code Example 1

require "json"
json_from_file = File.read("myfile.json")
hash = JSON.parse(json_from_file)

Learn ReactJs, React Native from akashmittal.com