---
title: "removeObjects(forKeys:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/nsmutabledictionary/removeobjects(forkeys:)"
---

# removeObjects(forKeys:)

Removes from the dictionary entries specified by elements in a given array.

## Declaration

```swift
func removeObjects(forKeys keyArray: [Any])
```

## Parameters

- `keyArray`: An array of objects specifying the keys to remove.

## Discussion

Discussion If a key in keyArray does not exist, the entry is ignored.

## See Also

### Removing Entries From a Mutable Dictionary

- [removeObject(forKey:)](foundation/nsmutabledictionary/removeobject(forkey:).md)
- [removeAllObjects()](foundation/nsmutabledictionary/removeallobjects().md)
