In Javascript you can access json as objects.
person = {
name: {
first: "Peter",
last: "Parker"
}
}
person.name.first
In ruby I have to use it like this:
person[:name][:first]
Is it possible to access json (and hash) as an object just like in javascript?
person.name.firstto work in Ruby, these would need to be methods. You would probably need to override themethod_missingin Hash to do a hash lookup when the property is not found.