title: filter elements in nested dictionary LINQ
body: <p>I have the following data structure:</p>
  
  <pre><code>Dictionary&lt;string, Dictionary&lt;string, List&lt;int&gt;&gt;&gt; data =
              new Dictionary&lt;string, Dictionary&lt;string, List&lt;int&gt;&gt;&gt;();
  </code></pre>
  
  <p>I want to filter some of the elements in that dictionary based on value in first element of the list of the inner dictionary.</p>
  
  <pre><code>for example:
  {legion1
  {soldier1, [10,1000]},
  {soldier2, [50,1000]}
  }
  </code></pre>
  
  <p>Now let's say I want to do foreach loop in which to work only elements where
  the value of the first element of the list is less than 20
  expected result in the foreach loop is:</p>
  
  <pre><code>{legion1{soldier1, [10,1000]}}
  </code></pre>
  
  <p>What I've tried:</p>
  
  <p>I do foreach loop and then I want to use something similar:</p>
  
  <pre><code>data.where(x =&gt; x.value.where(o =&gt; o[0] &lt; 20 ))
  </code></pre>
  
  <p>I always get error that that way is incorrect.</p>
  
  <p>Please tell how can I solve the issue and why my way is failing.</p>