How can i achieve Sorting of a List<Dictionary<string, string>>
.
I would like to sort the list on the basis of first element in the Dictionary.
My data Looks like
{
{{PID,A123},{SKU,TA50},{QTY,50}},
{{PID,C123},{SKU,TA52},{QTY,50}},
{{PID,B123},{SKU,TA53},{QTY,50}},
{{PID,A222},{SKU,TA54},{QTY,50}}
}
I am trying to get the output to look like
{
{{PID,A123},{SKU,TA50},{QTY,50}},
{{PID,A222},{SKU,TA54},{QTY,50}},
{{PID,B123},{SKU,TA53},{QTY,50}},
{{PID,C123},{SKU,TA52},{QTY,50}}
}
Solutions tried list.Sort - Not working since the contents are dictionary. list.OrderBy - Method not available.
Technology Working on - Visual Studio Community 2017, .NET 4.6.1, Console Application