title: JSON for dynamic object
body: <p>I am getting a list of countries along the count of partners in each country using the following linq query</p>
  
  <pre><code>Partners.GroupBy(
      x =&gt; x.Country, x =&gt; x.DisplayName, (key, g) =&gt;
      new Groups{ country = key, partners = g.Count() }
  );
  </code></pre>
  
  <p>now I want to send this information in a WebAPI response and the format must be like the following as the consumer application is already developed by an outsourced company.</p>
  
  <pre><code>"idIndex": {
      "30": 0,
      "47": 1,
      "49": 2
  }
  </code></pre>
  
  <p>In the above 30,47 and 49 is the number of partners in each country and 0,1,2 are their indexes.</p>
  
  <p>Regards,
  Zafar</p>