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

# bucketsFindAttribute()

- 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/bucketArray.ts

Finds attribute matching the provided predicate in a list of buckets.

**Signature:**

```typescript
export declare function bucketsFindAttribute(buckets: IBucket[], idOrFun?: string | AttributePredicate): AttributeInBucket | undefined;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| buckets | [IBucket](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.ibucket/index.md)[] | list of buckets to search |
| idOrFun | string \| [AttributePredicate](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.attributepredicate/index.md) | _(Optional)_ attribute predicate or string to find attribute by local identifier; defaults to [anyAttribute](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.anyattribute/index.md) |

**Returns:**

[AttributeInBucket](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.attributeinbucket/index.md) &#124; undefined

first-found attribute matching the predicate, undefined if none match

## Remarks

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