using System.Collections.Generic;
public static void Main()
var sellerId = "157747190185796800";
var listToReturn = new List<SalesDataRow>
new SalesDataRow { DateFromStr = "2020-08-25", Sales = 195000, Commission = 25350 },
new SalesDataRow { DateFromStr = "2020-08-26", Sales = 70500, Commission = 9165 },
new SalesDataRow { DateFromStr = "2020-08-27", Sales = 51000, Commission = 6630 },
data = listToReturn.ToDictionary (
item => item.DateFromStr,
commission = item.Commission
var json = JsonConvert.SerializeObject(resultToReturn, Formatting.Indented);
public string DateFromStr { get; set; }
public int Sales { get; set; }
public int Commission { get; set; }