In Rails, you can do hash.try(:[], :key) which helps if hash is potentially nil. Is there an equivalent version for using the new Ruby 2.3
hash.try(:[], :key)
hash
nil
&. is not equivalent to Rails' try, but you can use &. for hashes. Just use it, nothing special.
&.
try
hash[:key1]&.[](:key2)&.[](:key3)
Although I would not do that.