The aggregate configuration. Accepts the same values as the aggregate option.
Returns:Array
—The current aggregate configuration.
<script>var dataSource=newkendo.data.DataSource({data:[{name:"Jane Doe",age:30},{name:"John Doe",age:33}]});// calculate the minimum and maximum age
dataSource.aggregate([{field:"age",aggregate:"min"},{field:"age",aggregate:"max"}]);var ageAggregates = dataSource.aggregates().age;/* The result can be observed in the DevTools(F12) console of the browser. */console.log(ageAggregates.min);// displays "30"/* The result can be observed in the DevTools(F12) console of the browser. */console.log(ageAggregates.max);// displays "33"</script>
<script>var dataSource=newkendo.data.DataSource({data:[{name:"Jane Doe",age:30},{name:"John Doe",age:33}],aggregate:[{field:"age",aggregate:"min"},{field:"age",aggregate:"max"}]});var aggregates = dataSource.aggregate();/* The result can be observed in the DevTools(F12) console of the browser. */console.log(kendo.stringify(aggregates[0]));// displays {"aggregate": "min", "field": "age"}</script>