hi I am getting data from a database to create some graphs. I am getting back ~6000+ entries that all have a Type, Data, Month associated with them. I would like to combine these all into one data structure so that I can take advantage of a Hashes nature of no duplicate keys
to combine the data.
Example: I have output like..
'Component', 4.1167, 'June'
'Component', 3.2167, 'June'
'Component', 4.8667, 'June'
'Component', 3.3833, 'June'
I want to make a nested hash that looks like:
{'Component' => {'June' => '15.5834'}} #where all of the data gets added
The Data comes back to my program as 3 parallel arrays.
This way I can go through all of the data, accumulate it and allow the nature of the hash to remove the duplicates for my labels.
Is this possible in any way?
Thanks Hunter