I'm suffering to sort an object list by two attributes.
My Object Car has 3 attributes. name, type, price.
I need to order by type and price (lowest to highest).
The type is populated with Strings (EDMR, CMMD, JGAD, MDMR, etc) and needs to be ordered based in the first letter. The order needs to be M
first than E
than C
than any other letter
.
I need to get something like that:
Peugeot 107 - MCMR - 22.50
Nissan Micra - MCMR - 25.50
Peugeot 107 - MCMR - 30.05
Opel Corsa - EDMN - 29.50
Opel Corsa - EDMN - 31.50
Volkswagen Golf - CDMR - 48.00
Mercedes A Class- ICAV - 80.00
Mercedes - TVBN - 100.00
Could someone help me, please. I really don't now how to manage it.
Thank you so much for your time guys.