> Documentation index: https://www.gooddata.ai/docs/gooddata-ui/llms.txt lists every page of these docs as Markdown.

# bucketItemReduce()

- Package: [@gooddata/sdk-model](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/index.md)
- Kind: function
- Source: https://github.com/gooddata/gooddata-ui-sdk/blob/rel/11.64/libs/sdk-model/src/execution/buckets/index.ts

Creates a new bucket by modifying items of the provided input bucket.

**Signature:**

```typescript
export declare function bucketItemReduce(bucket: IBucket, reducer?: BucketItemReducer): IBucket;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| bucket | [IBucket](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.ibucket/index.md) | bucket in which all items are applied the modification function |
| reducer | [BucketItemReducer](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.bucketitemreducer/index.md) | _(Optional)_ the reducer function to apply to the bucket items |

**Returns:**

[IBucket](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.ibucket/index.md)

new instance of bucket with modified bucket items

## Remarks

Array of item from the input bucket will be dispatched to the reducer function and the result of the modification will be included in the new bucket.
