I need this Hash
{"peter" => ["apple", "orange", "mango"], "sandra" => ["flowers", "bike"]}
convert to this Array:
[["peter", "apple"], ["peter", "orange"], ["peter", "mango"], ["sandra", "flowers"], ["sandra", "bike"]]
Now I have got this solution
my_hash.inject([]){|ar, (k,v)| ar << v.map{|c| [k,c]}}.flatten(1)
But I believe here is more elegant solution with those zip or transpose magick :)