---
title: "subscript(_:)"
framework: realitykit
role: symbol
role_heading: Instance Subscript
path: "realitykit/ikcomponent/jointcollection/subscript(_:)"
---

# subscript(_:)

Accesses the element with the specified identifier.

## Declaration

```swift
subscript(id: IKComponent.JointCollection.Element.ID) -> IKComponent.JointCollection.Element? { get set }
```

## Parameters

- `id`: The identifier of the requested element.

## Overview

Overview The following set scenarios are ignored: Setting nil Setting element with different id, e.g. `collection[ID(2)]?.id = ID(3) Setting element with id not in the set
