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