Compress deeply nested hashes to a single level hash