solution to normalize ttml documents to a specific json structure