hsh = {:a => {'b' => [1, {:c => :d}]}}.json!
hsh.a.b # => [1, {:c=>:d}]
hsh[:a]['b'] # => [1, {:c=>:d}]
hsh.a.b[1].c # => :d
json_object = {"a" => {"b" => {"c" => ["foo", {"d" => "bar"}]}}}.json!
json_object.a['b'].c[1].d # => bar
-
Notifications
You must be signed in to change notification settings - Fork 0
toothrot/johnny-hash
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Adds json-object-style Hash accessors in Ruby for fun.
Resources
Stars
Watchers
Forks
Packages 0
No packages published