Findem interview question

Recursive json flattening, finding unique values in intervals