Sort parts when getting log as JSON