Recently I\'ve stuck on complicated task, being almost a challenge. And to solve it, you only need to make a reducing of the original data using static typing (TypeScript).