using System.Collections.Generic;
using System.Globalization;
using Newtonsoft.Json.Converters;
public partial class Contact
[JsonProperty("gender", NullValueHandling = NullValueHandling.Ignore)]
public string Gender { get; set; }
[JsonProperty("contact")]
public string ContactContact { get; set; }
[JsonProperty("mail_address", NullValueHandling = NullValueHandling.Ignore)]
public string MailAddress { get; set; }
[JsonProperty("Name", NullValueHandling = NullValueHandling.Ignore)]
public string Name { get; set; }
[JsonProperty("address", NullValueHandling = NullValueHandling.Ignore)]
public string Address { get; set; }
public static void Main()
""mail_address"": ""XXXX""
var result = JsonConvert.DeserializeObject<List<Dictionary<string, Contact>>>(input);
var flatternResult = result.SelectMany(x=>x);
foreach (var contactInformation in flatternResult) {
Console.Write($"\n\n{contactInformation.Key}: is null? {contactInformation.Value == null}");
+"\n Address : "+ contactInformation.Value?.Address
+"\n ContactContact : "+ contactInformation.Value?.ContactContact
+"\n Gender : "+ contactInformation.Value?.Gender
+"\n MailAddress : "+ contactInformation.Value?.MailAddress
+"\n Name : "+ contactInformation.Value?.Name