We have a list of data in a specific class:
public string id { get; set; }
public string date { get; set; }
What is the best way to group the list by date? For example, we have a list of 200+ entries of the class type above in any random order. Such as:
{ id: 324234, date: 120519 }
{ id: 354633, date: 120519 }
{ id: 9999349, date: 130519 }
We want to create another list which groups the items by the data such as:
[
120519: [
{ id: 324234, date: 120519 }
{ id: 354633, date: 120519 }
],
130519: [
{ id: 9999349, date: 130519 }
],
]