Delete duplicate values from dictionary<string,List<string>> with LINQ
<p>I have a dictionary with <code>string</code> keys and <code>List&lt;string&gt;</code> values. I would like to grab unique values for each list.</p>

<p>For example, this input data:</p>

<pre><code>{
    "first": ["1", "2", "3", "1"],
    "second": ["2", "3", "4", "3"]
}
</code></pre>

<p>Would return this:</p>

<pre><code>{
    "first": ["1", "2", "3"],
    "second": ["2", "3", "4"]
}
</code></pre>

<p>I was trying this but it didn't work:</p>

<pre><code>var uniq = duplidictionary.GroupBy(x =&gt; x.Value)
                          .Select(y =&gt; y.First())
                          .ToDictionary( x =&gt; x.Key, y =&gt; y.Value);
</code></pre>

<p>Instead of returning my expected result, this seemed to return a copy of my original dictionary. <a href="https://dotnetfiddle.net/eYEGhX" rel="nofollow">Here is a DotNetFiddle illustrating my code not working</a>.</p>

<p>How can I use LINQ to get this output from the given input?</p>