@chris fullmer said:
I've used both [hashes and dictionaries] before, just never really enough to feel like I know what I'm doing.
Crash course in hashes (a very useful tool to have at hand):
A hash is a dictionary and vice-versa. They are sets of key/value pairs. An array is one form of hash: arr[0] = 'fred'. The key is zero and the value is 'fred'. Arrays are commonly restricted to integer keys. The term "dictionary" is commonly used when the keys are single words. dict['name']='fred'.
Ruby makes hashes dead simple (though only a devout Rubyist could love the syntax):
Ruby-example.jpg
In JavaScript, both objects and arrays are hashes:
javascript-examples.jpg
The last example shows that the key need not be a string. (True in Ruby if you start with a hash: h=Hash.new() or h={}.) The key can be virtually anything. I'm using SketchUp ComponentInstance objects as keys in the stuff I'm doing today (trying to get a lot of things moving all at once).
In Ruby, an array must be indexed by number. A hash may be indexed by anything. In JavaScript, an array is really a hash, which wins the flexibility prize but you wouldn't enter them in a race.