title: Select values from multiple dictionaries into list of objects with LINQ
body: <p>I want to select OrderId &amp; Row from multiple dictionaries and create a list of Orders which contains a list of Rows.</p>
  
  <p>The code I'm struggling with this far is:</p>
  
  <pre><code>var listOfDictionaries = new List&lt;Dictionary&lt;string, string&gt;&gt;();
  
  var dict1 = new Dictionary&lt;string, string&gt;();
  dict1.Add("OrderId", "12345");      
  dict1.Add("Row", "1");              
  listOfDictionaries.Add(dict1);
  
  var dict2 = new Dictionary&lt;string, string&gt;();
  dict2.Add("OrderId", "97845");
  dict2.Add("Row", "10");
  listOfDictionaries.Add(dict2);
  
  var dict3 = new Dictionary&lt;string, string&gt;();
  dict3.Add("OrderId", "12345");
  dict3.Add("Row", "2");
  listOfDictionaries.Add(dict3);
  
  var grouped = listOfDictionaries.SelectMany(d =&gt; 
                   d.Where(kvp =&gt; 
                      kvp.Key.ToLower().Contains("orderid") || kvp.Key.ToLower().Contains("row")))
                .GroupBy(a =&gt; a.Key).ToList();
  
  public class Order 
  {
      public Order() 
      {
         OrderRows = new List&lt;OrderRow&gt;();
      }
  
      public string OrderId { get; set; }
      public List&lt;OrderRow&gt; OrderRows { get; set; }
  }
  
  public class OrderRow 
  {
      public string OrderRowId { get; set; }
  }
  </code></pre>
  
  <p>Anyone have a good idea how to solve this?      </p>