<!--
{
  "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/XPCArray/subscript(_:)-6c9gh",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Subscript",
  "symbol" : {
    "kind" : "Instance Subscript",
    "modules" : [
      "XPC"
    ],
    "preciseIdentifier" : "s:3XPC8XPCArrayVySSSgSicip"
  },
  "title" : "subscript(_:)"
}
-->

# subscript(_:)

Reads and writes the value at the given index as a string.

```
subscript(index: Int) -> String? { get set }
```

## Parameters

`index`

The position of the element to access.

## Return Value

The value at the specified index in the array, 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)