<!--
{
  "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/NSDictionary/init(dictionary:)-9fw1u",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSDictionary(im)initWithDictionary:"
  },
  "title" : "init(dictionary:)"
}
-->

# init(dictionary:)

Initializes a newly allocated dictionary by placing in it the keys and values contained in another given dictionary.

```
convenience init(dictionary otherDictionary: [AnyHashable : Any])
```

## Parameters

`otherDictionary`

A dictionary containing the keys and values with which to initialize the new dictionary.

## Return Value

An initialized dictionary—which might be different than the original receiver—containing the keys and values found in `otherDictionary`.

## See Also

[`+  dictionaryWithDictionary:`](/documentation/Foundation/NSDictionary/dictionaryWithDictionary:)

Creates a dictionary containing the keys and values from another given dictionary.



---

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)