Pergunta de entrevista da empresa Google

Sort a nested array ordered by the second element in the index