title: How to filter a dictionary to have items with unique values?
body: <p>Please bear with me if you think I haven't done enough research before asking</p>
  
  <p><strong>Problem</strong>
  Just came across a business requirement where we have to make sure the values in a dictionary are unique. i.e., We should filter a dictionary and the result of such filtering should have key value pairs with unique values.</p>
  
  <p>BTW, it is a simple Dictionary with string values and string keys.  To clarify more, below are the <strong>sample input and expected output values -</strong><br>
  sourceDictionary would have values like below (just for the sake of representation of data, not syntactically correct) -  {    {"Item1", "Item One"},  {"Item11", "Item One"}, {"Item2", "Item Two"}, {"Item22", "Item Two"}  }  for this input, filteredDictionary should look like below -  {    {"Item1", "Item One"},  {"Item2", "Item Two"}  }  </p>
  
  <p><strong>Solution I proposed that is working</strong></p>
  
  <pre><code>    var sourceDictionary = serviceAgent.GetSampleDictionary(); // Simplified for brevity  
      var filteredDictionary =  
          sourceDictionary.GroupBy(s =&gt; s.Value)  
              .Where(group =&gt; @group.Any())  
              .Select(g =&gt; g.First())  
              .ToDictionary(kvp =&gt; kvp.Key, kvp =&gt; kvp.Value);  
  </code></pre>
  
  <p><strong>Question</strong>
  Am I making too much logic into it? OR, putting it in other words, is there a simpler way to do this?</p>