<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSMutableDictionary/addEntries(from:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSMutableDictionary(im)addEntriesFromDictionary:"
  },
  "title" : "addEntries(from:)"
}
-->

# addEntries(from:)

Adds to the receiving dictionary the entries from another dictionary.

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

## Parameters

`otherDictionary`

The dictionary from which to add entries

## Discussion

Each value object from `otherDictionary` is sent a <doc://com.apple.documentation/documentation/ObjectiveC/NSObject-c.protocol/retain> message before being added to the receiving dictionary. In contrast, each key object is copied (using [`copy(with:)`](/documentation/Foundation/NSCopying/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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)