Access Nested Hash Value with Dig Method in Ruby
- Categories:
- ruby
When you need to access value from nested Hash, it’s better to use dig
method. Without dig
you have to do nil checking to prevent error.
- Tags:
- #ruby
Sponsored Links
- Register to Digital Ocean cloud with this link and get $200 credit
- Looking for cheap CDN? Bunny is the answer
- Alternative Cloud besides AWS and Digital Ocean