title: Compare keys of dictionary with values of another dictionary
body: <p>I have two dictionaries, both of type <code>Dictionary&lt;string, List&lt;List&lt;string&gt;&gt;</code>.
  I want to select the range of entries from dictionary 1 which match the values/entries from dictionary 2.</p>
  
  <p>E.g. dictionary 1 has the keys <code>01, 01.1</code> and dictionary 2 has the matching values <code>01, 01.1.</code> at key <code>1</code></p>
  
  <p>First I get the entries from dictionary 2 at key 1 like this:</p>
  
  <pre><code>var dictList = (from entry in DbDict
                  where entry.Key == id.ToString() // id = 1
                  select entry).ToList();
  </code></pre>
  
  <p>I tried to select these via linq with something like this:</p>
  
  <pre><code>var matchingEntries = (from entry in ExcelDict
                         where ExcelDict.Keys.Equals(dictList[0].Value)
                         select entry).ToList();
  </code></pre>
  
  <p>and tried more along those lines, but it won't return any results.</p>
  
  <p>How do I get the range of valuepairs from dictionary 1, whose keys match the values of dictionary 2?</p>
  
  <p><strong>Edit1:</strong></p>
  
  <pre><code>Dictionary 1: 
  Key     Value
  01      "these", "are"
          ..., ...
  01.1    "just", "some"
          ..., ...
  02      "sample", "values"
          ..., ...
  
  Dictionary 2:
  Key     Value
  1       "01", "01.1"
          "foo", "bar"
          ..., ...                
  2       "02", "02.21"
          "value1" "value2"
  </code></pre>
  
  <p><strong>Edit2:</strong></p>
  
  <p>Expected output:</p>
  
  <pre><code>"01", "01.1"
  "foo", "bar"
  </code></pre>
  
  <p><strong>Edit3:</strong></p>
  
  <p>Compilable input as requested in the comments. This is exactly the structure I'm dealing with:</p>
  
  <pre><code>var dict1 = new Dictionary&lt;string, List&lt;List&lt;string&gt;&gt;&gt;();
  
  dict1.Add("01", new List&lt;List&lt;string&gt;&gt; { new List&lt;string&gt; { "these" }, new List&lt;string&gt; { "are" } });
  dict1.Add("01.1", new List&lt;List&lt;string&gt;&gt; { new List&lt;string&gt; { "just" }, new List&lt;string&gt; { "some" } });
  dict1.Add("02", new List&lt;List&lt;string&gt;&gt; { new List&lt;string&gt; { "sample" }, new List&lt;string&gt; { "values" } });
  
  
  var dict2 = new Dictionary&lt;string, List&lt;List&lt;string&gt;&gt;&gt;();
  dict2.Add("1", new List&lt;List&lt;string&gt;&gt; { new List&lt;string&gt; { "01", "01.1" }, new List&lt;string&gt; { "foo", "bar" } });
  dict2.Add("2", new List&lt;List&lt;string&gt;&gt; { new List&lt;string&gt; { "02", "value1" }, new List&lt;string&gt; { "02.21", "value2" } });
  </code></pre>
  
  <p><strong>Edit4:</strong></p>
  
  <p>Sorry for the late response. Both Gaurang Dave's suggestion in the comments and the accepted answer worked for me. Thanks for everyone's help!</p>