Skip to content

toothrot/johnny-hash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a terrible idea

Jsony-Hash

Examples

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

About

Adds json-object-style Hash accessors in Ruby for fun.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages