Hash_dig 2022-11-18 ruby Given hash = { a: { b: { c: 'hi' } } } You can safely “dig” for :c with hash.dig(:a, :b, :c) => 'hi' Digging for a value that doesn’t exists results in nil: hash.dig(:a, :d) => nil