title: How to return a string array with complex structure in c#
body: <p>for a legacy system, I need to return an object than have inside it a key value than it's the date, and inside have a body, any idea how to get the job done?</p>
  <p>I need to return this array</p>
  <pre><code>{
  &quot;sellerId&quot;:&quot;157747190185796800&quot;,
   &quot;data&quot;:
   { 
    &quot;2020-08-25&quot;:{ &quot;sales&quot;:195000,&quot;comission&quot;:25350},
    &quot;2020-08-26&quot;:{&quot;sales&quot;:70500,&quot;comission&quot;:9165},
    &quot;2020-08-27&quot;:{ &quot;sales&quot;:51000,&quot;comission&quot;:6630}
   } 
  }
     
  </code></pre>
  <p>I'm trying with a json result and it works, but there's a problem with the key value date</p>
  <p>Edit: I'm trying to make the suggestion of an dictionary, but, I don't know what I'm doing bad in this case. i try as an object too and doesn't work.</p>
  <pre><code>    var lst = new List&lt;Dictionary&lt;string, JsonResult&gt;&gt;();
  
      foreach (var item in listToReturn)
      { 
  
          lst.Add(new Dictionary(item.DateFromStr, new JsonResult (new
          {
              sales = item.sales,
              comission = item.Comission,
          })));
           
      }
  </code></pre>