use hash_flattener gem