HealthMatch interview question

Recursively process a tree-like data in JSON and calculate few statistics from that