Pregunta de entrevista de Turing

give me a coding challenge of flatting a deeply nested javascript object.