What I meant by "what are you trying to do?" I meant what is the problem you are trying to solve.
Merging hashes recursively is possible but I think you might be better suited with a different data structure. Maybe I'm wrong but I can't see why you would need to do that.