using System.Collections;
using System.Collections.Generic;
public static void Main()
typeof(ChoJSONReader).GetAssemblyVersion().Print();
""BrandId"": ""998877665544332211"",
""Categories"": [ ""112233445566778899"" ],
""Description"": { ""vi"": ""Phone"" },
""Value"": ""987654321"",
""Description"": { ""vi"": ""Phone"" },
ChoETLSettings.KeySeparator = '-';
using (var r = ChoJSONReader.LoadText(json)
.WithField("Category", jsonPath: "Categories[0]", isArray: false)
.WithField("Phone", jsonPath: "Contact.Phone[*]")
var dt = r.SelectMany(rec => ((IList)rec.Phone).OfType<dynamic>().Select(rec1 =>
dynamic ret = new ChoDynamicObject();
ret["BrandId"] = rec.BrandId;
ret["Contact.Phone.Value"] = rec1.Value;
ret["Contact.Phone.Description.vi"] = rec1.Description.vi;
ret["Contact.Phone.Type"] = rec1.Type;
ret["Category"] = rec.Category;