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

# bucketModifyItems()

- 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 bucketModifyItems(bucket: IBucket, modifications?: BucketItemModifications): 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 |
| modifications | [BucketItemModifications](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.bucketitemmodifications/index.md) | _(Optional)_ the modification 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

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

Note: it is valid for the modification function to just return the original item. In that case the item will be included in the bucket without modification.
