title: How to combine a dictionary and list by key
body: <p>I have a dictionary which looks like this:</p>
  
  <pre><code>Dictionary&lt;String, String&gt; dictionary = new Dictionary&lt;string, string&gt;{
    { "dog", "DOG" },
    { "cat", "CAT" },
    ...continued
  };
  </code></pre>
  
  <p>and I want to extract the Id value from a list that has a matching value like below:</p>
  
  <pre><code>List&lt;Animal&gt; records = new List&lt;Animal&gt;{
    { Id: "1", Name: "DOG" },
    { Id: "2", Name: "CAT" }
    ...continued
  }
  </code></pre>
  
  <p>I need to output a dictionary that looks like this:</p>
  
  <pre><code>Dictionary&lt;String, String&gt; newDictionary = new Dictionary&lt;string, string&gt;
    { "dog": "1" },
    { "cat": "2 }
    ...continued
  }
  </code></pre>
  
  <p>Is there a simple LINQ solution to this?</p>