To have an array with 3 elements, each being a hash, you can create an array and assign hashes to its elements. Here's an example:
main.rb71 chars6 lines
To print the third hash, you can use the index 2
(arrays are zero-based). Here's how you can do it:
main.rb14 chars2 lines
This will output the third hash {key3: "value3"}
.
gistlibby LogSnag