Pergunta de entrevista da empresa Turing

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