I have an array of hashes who looks like :
[{"PROJECT"=>"awesome_project1","VERSION"=>128, "STATUS"=>"not required"},
{"PROJECT"=>"awesome_project2", "VERSION"=>32, "STATUS"=>"finished"},
{"PROJECT"=>"awesome_project1", "VERSION"=>64, "STATUS"=>"scheduled"}]
And I'm trying to merge the hashes based on one of the hask key, knowing that the key to group_by can change. So if I want to group_by "PROJECT" it would looks like :
[{"PROJECT"=>"awesome_project1","VERSION"=>[128,64], "STATUS"=>["not required","scheduled"]},
{"PROJECT"=>"awesome_project2", "VERSION"=>32, "STATUS"=>"finished"}]
For the moment the closest I am to the result is by using group_by.
Do you have an idea on how to do it ?