static void Main(string[] args) { string json = File.ReadAllText("sample.txt"); JArray a = JArray.Parse(json); List list = new List(); foreach (JObject content in a.Children()) { list.Add(new Example() { uid = content["uid"].ToString(), email = content["email"].ToString(), completed_percentage = Convert.ToDouble(content["php.completed_percentage"]) }); } WriteCSV(list, "test.csv"); } public static void WriteCSV(IEnumerable items, string path) { Type itemType = typeof(T); var props = itemType.GetProperties(BindingFlags.Public | BindingFlags.Instance) .OrderBy(p => p.Name); using (var writer = new StreamWriter(path)) { writer.WriteLine(string.Join(", ", props.Select(p => p.Name))); foreach (var item in items) { writer.WriteLine(string.Join(", ", props.Select(p => p.GetValue(item, null)))); } } } public class Example { public string uid { get; set; } public string email { get; set; } public double completed_percentage { get; set; } }