VueOps Interview Question

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