Pergunta de entrevista da empresa Elastic

Live coding: Take a nested javascript object and condense it into a single level, with the nested keys separated by periods.