---
title: "subscript(_:)"
framework: spritekit
role: symbol
role_heading: Instance Subscript
path: "spritekit/sknode/subscript(_:)"
---

# subscript(_:)

Returns an array of nodes that match the name parameter.

## Declaration

```swift
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.

## Mentioned in

Searching the Node Tree

## Return Value

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

## See Also

### Accessing Nodes by Name

- [Searching the Node Tree](spritekit/searching-the-node-tree.md)
- [name](spritekit/sknode/name.md)
- [childNode(withName:)](spritekit/sknode/childnode(withname:).md)
- [enumerateChildNodes(withName:using:)](spritekit/sknode/enumeratechildnodes(withname:using:).md)
