title: Group outer collection based on a property value of nested (inner) collection
body: <p>I have a collection A which internally has a collection B as one of its property. I want to group all the items of the outer collection A based on a value of a property of the inner collection.</p>
  
  <pre><code>class A
  {
      string A;
      List&lt;B&gt; NestedColl;
  }
  
  class B
  {
      string key;
      string name;
      int id;
  }
  </code></pre>
  
  <p>Now I have </p>
  
  <pre><code>List&lt;A&gt; localCollection = new List&lt;A&gt;();
  </code></pre>
  
  <p>I want to group all the collection items based on the value of Id in the nested collection.</p>