Pergunta de entrevista da empresa HSBC

how to sort files under tags based on the data within the file?