VueOps interview question

Q: Implement Flatten hash method in ruby, if nested hash given.