I have a list of objects on my software that i want to sort through a common field, example :
List<Object> obj
ID 1 Price 0.0
ID 1 Price 1.2
ID 1 Price 1.3
ID 2 Price 2.0
Can i sort the list to make the objects with ID = 1 appear only once? In this case, only the first object with ID = 1 would be left on the list, example:
ID 1 Price 0.0
ID 2 Price 2.0
How can i achieve this?