Handling aggregation responses with NEST csharp

Code Example - Handling aggregation responses with NEST csharp

                
                        response.ShouldBeValid();

var childAggregation = response.Aggregations.Children("name_of_child_agg");

var averagePerChild = childAggregation.Average("average_per_child");

averagePerChild.Should().NotBeNull(); 

var maxPerChild = childAggregation.Max("max_per_child");

maxPerChild.Should().NotBeNull();