&. is not equivalent to Rails’ try, but you can use &. for hashes. Just use it, nothing special.
hash[:key1]&.[](:key2)&.[](:key3)
Although I would not do that.
&. is not equivalent to Rails’ try, but you can use &. for hashes. Just use it, nothing special.
hash[:key1]&.[](:key2)&.[](:key3)
Although I would not do that.