Domanda di colloquio di Elastic

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