---
title: "addEntries(from:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/nsmutabledictionary/addentries(from:)"
---

# addEntries(from:)

Adds to the receiving dictionary the entries from another dictionary.

## Declaration

```swift
func addEntries(from otherDictionary: [AnyHashable : Any])
```

## Parameters

- `otherDictionary`: The dictionary from which to add entries

## Discussion

Discussion Each value object from otherDictionary is sent a retain message before being added to the receiving dictionary. In contrast, each key object is copied (using copy(with:)—keys must conform to the NSCopying protocol), and the copy is added to the receiving dictionary. If both dictionaries contain the same key, the receiving dictionary’s previous value object for that key is sent a release message, and the new value object takes its place.

## See Also

### Adding Entries to a Mutable Dictionary

- [setObject(_:forKey:)](foundation/nsmutabledictionary/setobject(_:forkey:).md)
- [setValue(_:forKey:)](foundation/nsmutabledictionary/setvalue(_:forkey:).md)
- [setDictionary(_:)](foundation/nsmutabledictionary/setdictionary(_:).md)
