in reply to problem with array of hashes
Hash keys aren't ordered, so there is no getting of the "last" hash key or so.
So the question is, how do you identify which hash key you want to retrieve? If it's the key with 't' as a value, you have to iterate through the whole hash -- which likely means that the data structure is poorly chosen for you application. Also if you want to search by value, what do you do if multiple keys have the same value?
Or is there any other logic by which you identify the '41'?
|
|---|