sorting in json output and traininglog ui