Trying to write with safe navigator :
account["details"]["name"]
below doesn't work with unknown method & error.
account&["details"]&["name"]
using jRuby9, rails-5.2
The safe navigator version would look like this:
account&.[]("details").&[]("name")
Or you might consider using Hash#dig
:
account.dig("details", "name")