Transform comments data so it can be rendered recursively.