Click here to Skip to main content
15,898,134 members

Comments by Member 11405465 (Top 1 by date)

Member 11405465 26-Mar-19 13:50pm View    
Hi thank you for your reply. I tried to deserialize the jsons into c# class objects and applied group by which yielded me first level of grouping. Below is the sample code.

var JsonList = new List<rootobject>();
string[] files = { @"SampleJSON.json", @"C:SampleJSON1.json" };
foreach (var file in files)
{
JsonList.AddRange(JsonConvert.DeserializeObject<list<rootobject>>(File.ReadAllText(file)));
}
var JsonArrays = (JsonList.GroupBy(x => x.name).Select(y => y));

But I still have two more list inside those grouped data which again needs to be grouped.