Ruby Explained: Hashes
This post will get into Hashes, which many Ruby newbies have never seen before but which are incredibly useful
Hashes may be a bit intimidating at first but they're actually pretty similar to arrays. They're basically just containers for data, like arrays, but instead of storing data based on numeric indices, you use "keys" which can be strings or symbols. This makes hashes more appropriate for storing data with a bit more depth to it.
A Hash is just a container for data where each piece of data is mapped to a Key. The data is called the Value. Keys can be either strings or symbols. Values can be anything, just like with arrays. A hash looks almost like an array, but with squiggly braces {}
instead of hard ones []
There's no order to a hash (unlike an array)... you're accessing your data using strings anyway so it doesn't matter which order they're in.