If they are stored in lowercase then they will be printed in lowercase.
If your groups are sorted alphabetically, you can just add a sortBy(), if it is some custom order, you will have to map a value to each group to sort by.
In blueprint values are with capital letter, for example: Group: Pirma grupÄ—, but still group value is printed in all lowercase.
To sort alphabetically with sortBy() - that’s working well, but the question is how to have the same order, as this field option values have in blueprint (there is not certain sort, like alphabetical).
Well, then you have to eitherread that order from the blueprint or create an array of values in the same order and assign a sort number to them, then sort by that array.
Basically, you would first use map() to assign a sorting order to the grouped collection, then use this assigned sort value to sort by.
Or you sort your registrations first by that grouping value, then group, like here: