title: Order,group and sum List of array in ExpandoObject c#
body: <p>I am trying to sum the &quot;col3&quot; values by ordering and grouping the &quot;col1&quot; and &quot;col2&quot; using C# Linq.</p>
  <pre><code>    List&lt;dynamic&gt; list = new List&lt;dynamic&gt;();
  
      dynamic expando = new ExpandoObject();
  dynamic expando1 = new ExpandoObject();
  
      var p = expando as IDictionary&lt;string, object&gt;;
  
      p[&quot;col1&quot;] = &quot;New val 1&quot;;
      p[&quot;col2&quot;] = &quot;New val 2&quot;;
      p[&quot;col3&quot;] = 20;
  
      list.Add(p);
  
      var q = expando1 as IDictionary&lt;string, object&gt;;
  
      q[&quot;col1&quot;] = &quot;New val 1&quot;;
      q[&quot;col2&quot;] = &quot;New val 3&quot;;
      q[&quot;col3&quot;] = 10;
  
      list.Add(q);
  </code></pre>
  <p>I am trying to get the output as</p>
  <blockquote>
  <p>New val 1</p>
  <ul>
  <li>New val 2</li>
  <li>New val 3</li>
  </ul>
  </blockquote>
  <hr/>
  <blockquote>
  <p>Total     --        30</p>
  </blockquote>