<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "XPC",
  "identifier" : "/documentation/XPC/XPCDictionary/subscript(_:)-3i01t",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Subscript",
  "symbol" : {
    "kind" : "Instance Subscript",
    "modules" : [
      "XPC"
    ],
    "preciseIdentifier" : "s:3XPC13XPCDictionaryVyxSgSScSZRzluip"
  },
  "title" : "subscript(_:)"
}
-->

# subscript(_:)

Reads and writes the value associated with the given key as a signed integer value.

```
subscript<T>(key: String) -> T? where T : SignedInteger { get set }
```

## Parameters

`key`

The key the look up in the dictionary.

## Return Value

The value associated with key in the dictionary; otherwise, <doc://com.apple.documentation/documentation/ObjectiveC/nil-227m0>.

---

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)