newAttributeSort()
Home > @gooddata/sdk-model > newAttributeSort
newAttributeSort() function
Creates a new attribute sort - sorting the result by values of the provided attribute's elements.
Signature:
export declare function newAttributeSort(attributeOrId: IAttribute | string, sortDirection?: SortDirection): IAttributeSortItem;
Parameters
Parameter | Type | Description |
---|---|---|
attributeOrId | IAttribute | string | attribute to sort by |
sortDirection | SortDirection | (Optional) asc or desc, defaults to "asc" |
Returns:
always new item
Remarks
The attribute can be either specified by value or by reference using its local identifier.