Reputation: 4265
I can't seem to wrap my head around this one. I need to sort a Dictionary by the value of an inner Dictionary using LINQ. Any thoughts?
Upvotes: 2
Views: 777
Reputation: 1064204
Do you mean you want all values, sorted by the inner value?
from outerPair in outer
from innerPair in outerPair.Value
orderby innerPair.Value
select new {
OuterKey = outerPair.Key,
InnerKey = innerPair.Key,
Value = innerPair.Value
};
Upvotes: 2