New to KendoReactStart a free 30-day trial

groupBy

Function

Definition

Package:@progress/kendo-data-query

Syntax:

ts

import { groupBy } from '@progress/kendo-data-query';

const data = [
    { name: "Pork", category: "Food", subcategory: "Meat" },
    { name: "Pepper", category: "Food", subcategory: "Vegetables" },
    { name: "Beef", category: "Food", subcategory: "Meat" }
];

const result = groupBy(data, [{ field: "subcategory" }]);

Groups the provided data according to the specified descriptors.

Parameters:dataT[]

The data that will be grouped.

descriptorsGroupDescriptor[]

The descriptors.

transformersReducer

For internal use.

originalDataT[]

For internal use.

Returns:

T[] | GroupResult[]

  • The grouped data.
In this article
Definition
Not finding the help you need?
Contact Support