---
title: "keysOfEntries(passingTest:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/nsdictionary/keysofentries(passingtest:)"
---

# keysOfEntries(passingTest:)

Returns the set of keys whose corresponding value satisfies a constraint described by a block object.

## Declaration

```swift
func keysOfEntries(passingTest predicate: (Any, Any, UnsafeMutablePointer<ObjCBool>) -> Bool) -> Set<AnyHashable>
```

## Parameters

- `predicate`: A block object that specifies constraints for values in the dictionary.

## Return Value

Return Value The set of keys whose corresponding value satisfies predicate.

## See Also

### Related Documentation

- [enumerateKeysAndObjects(_:)](foundation/nsdictionary/enumeratekeysandobjects(_:).md)

### Filtering Dictionaries

- [keysOfEntries(options:passingTest:)](foundation/nsdictionary/keysofentries(options:passingtest:).md)
