# 코드조각. foo[:key] to foo.key

foo = { :mykey => "myvalue", :hello => "world" }

foo = JSON.parse(foo.to_json, object_class: OpenStruct)

# foo.hello
# => "world"
1
2
3
4
5
6