I have an array of Products , each of which has a name and a category. I would like to create a hash in which each key is a category line, and each element is a product of this category, akin to the following:
{ "Apple" => [ <Golden Delicious>, <Granny Smith> ], ... "Banana" => ...
Is it possible?
Evan baxter
source share