<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@easyops-cn/brick-next-pipes](./brick-next-pipes.md) &gt; [sort](./brick-next-pipes.sort.md)

## sort() function

返回一个数组按指定属性排序后的新数组。

 Array

**Signature:**

```typescript
export declare function sort<T>(value: T[], fields?: string | string[]): T[];
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  value | T\[\] | 数组。 |
|  fields | string \| string\[\] | 属性（路径）。 |

**Returns:**

T\[\]

排序后的新数组。

