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
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
Copyright © 2021 Jogjafile Inc.
The safe navigator version would look like this:
Or you might consider using
Hash#dig: