title: C# Linq on a list of dictionaries to filter it
body: <p>I'm having a problem not knowing how to use LINQ properly.</p>
  
  <p>I have a <code>List</code> of <code>Dictionaries(string, object)</code> like this:</p>
  
  <pre><code>[0] -&gt; "field1":1500, "field2":"dog", "field3":"blue"
  [1] -&gt; "field1":1700, "field2":"cat", "field3":"brown"
  [2] -&gt; "field1":1500, "field2":"horse", "field3":"white"
  [3] -&gt; "field1":1900, "field2":"cow", "field3":"black"
  </code></pre>
  
  <p>I need to get from this a <code>List</code> of <code>Dictionaries</code> with only the Dictionaries that have the <code>"field1"</code> set to <code>1500</code>, so the output should be:</p>
  
  <pre><code>[0] -&gt; "field1":1500, "field2":"dog", "field3":"blue"
  [1] -&gt; "field1":1500, "field2":"horse", "field3":"white"
  </code></pre>
  
  <p>I tried doing it like this but I'm sure I'm nowhere near the right answer.</p>
  
  <pre><code>List&lt;Dictionary&lt;string, object&gt;&gt; output = input.SelectMany(r =&gt; r).Where(r =&gt; (r.Key == "field1") &amp;&amp; (r.Value == 1500)).ToList();
  </code></pre>
  
  <p>Please can you suggest me a solution for this?</p>
  
  <p>Thank you very much.</p>