This seems really simple but I've looked all over and I can't find any documentation for this.
I have the following json file:
//data.json
{
"movie1": [
{"name": "Inception"}
]}
and I just want to print the value of name with Ruby.
json = File.read('data.json')
data = JSON.parse(json)
data['movie1']['name']
But I'm getting the error
"no implicit conversoin of String into Integer"
How can I print name?
pp datawould give you clues as to the issue.