My ruby script filters a log and generates a hash like this
scores = {"Rahul" => "273", "John"=> "202", "coventry" => "194"}
by skipping multiple values for a key which is obvious
log file will be like this
Rahul has 273 Rahul has 217 John has 202 Coventry has 194
Is it Possible to generate something like this
scores = {"Rahul" => "273", "Rahul" =>"217",
"John"=> "202", "coventry" => "194"}
scores = {"Rahul" => "273","217",
"John"=> "202", "coventry" => "194"}
Is there a way to forcefully write into a hash even though the key is already existing in the hash
I will be grateful to any help or suggestions