<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "SpriteKit",
  "identifier" : "/documentation/SpriteKit/SKNode/subscript(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Subscript",
  "symbol" : {
    "kind" : "Instance Subscript",
    "modules" : [
      "SpriteKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SKNode(im)objectForKeyedSubscript:"
  },
  "title" : "subscript(_:)"
}
-->

# subscript(_:)

Returns an array of nodes that match the name parameter.

```
subscript(name: String) -> [SKNode] { get }
```

## Parameters

`name`

The name to search for. This may be either the literal name of the node or a customized search string. See `Searching the Node Tree`.

## Return Value

An array of `SKNode` objects that match the name. If no matching nodes are found, an empty array is returned.

---

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)