---
title: "enumerateKeysAndObjects(_:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/nsdictionary/enumeratekeysandobjects(_:)"
---

# enumerateKeysAndObjects(_:)

Applies a given block object to the entries of the dictionary.

## Declaration

```swift
func enumerateKeysAndObjects(_ block: (Any, Any, UnsafeMutablePointer<ObjCBool>) -> Void)
```

## Parameters

- `block`: A block object to operate on entries in the dictionary.

## Discussion

Discussion If the block sets *stop to true, the enumeration stops.

## See Also

### Enumerating Dictionaries

- [keyEnumerator()](foundation/nsdictionary/keyenumerator().md)
- [objectEnumerator()](foundation/nsdictionary/objectenumerator().md)
- [enumerateKeysAndObjects(options:using:)](foundation/nsdictionary/enumeratekeysandobjects(options:using:).md)
- [makeIterator()](foundation/nsdictionary/makeiterator().md)
