using Newtonsoft.Json.Linq;
using Newtonsoft.Json.Serialization;
public static void Main()
""_index"": ""my-index"",
""_id"": ""TrxrZGYQRaDom5XaZp23"",
""my_id"": ""65a107ed-7325-342d-adab-21fec0a97858"",
""_index"": ""my-index"",
""_id"": ""jhgDtrEYHrjgJafgRy456"",
""my_id"": ""52f0be23-1d2f-4779-bde9-32fc9e50168e"",
""host"": ""something else"",
var results = JToken.Parse(json)
.SelectTokens("hits.hits[*]._source")
.Select(t => t.ToObject<Result>())
foreach (var result in results)
Console.WriteLine("Id: " + result.Id);
Console.WriteLine("Host: " + result.Host);
Console.WriteLine("PostalCode: " + result.PostalCode);
[JsonProperty(PropertyName = "my_id")]
public string Id { get; set; }
[JsonProperty(PropertyName = "host")]
public string Host { get; set; }
[JsonProperty(PropertyName = "zip")]
public string PostalCode { get; set; }