How Can I Add additional Dictionary Object below
var topLevel1 = resultRows.GroupBy(g => g["CustomerAccountType"])
.ToDictionary(g => g.Key, g => g.ToList());
I want to add this within the LINQ line
new Dictionary<string, object> { {"children", someDictionaryAgain}}
I want to append additional dictionary object after the .ToDictionary()
something like
var topLevel1 = resultRows.GroupBy(g => g["CustomerAccountType"])
.ToDictionary(g => g.Key, g => g.ToList()).Add(new Dictionary<string, object> { {"somekey", "somevalueorobject"}}
Here is the expected output I wanted.
var toplevel = Dictionary <stirng, object> {
{"Actual1", 0},
{"Actual2", 0}
}
After .ToDictionary() --> What code is best to use to achieve
var toplevel = Dictionary <stirng, object> {
{"Actual1", 0},
{"Actual2", 0},
{"AddedDynamically",0}
}