# `GSLayer nodeAtIndexPath:`

*Instance Method*

Returns the node at an index path.

## Declaration

```swift
func node(at indexPath: IndexPath) -> GSNode?
```

```objc
- (GSNode *) nodeAtIndexPath:(NSIndexPath *) indexPath;
```

```python
nodeAtIndexPath_(indexPath: NSIndexPath) -> GSNode
```

## Discussion

The first index is the linear path index and the second index is the node index in that path. Returns `nil` if the first index does not refer to a path.

## See Also

### Nodes

- [`GSLayer.allNodes`](/Core/GlyphsCore/GSLayer/allNodes) — All nodes from all path shapes in linear shape order.
- [`GSLayer allNodesCount`](/Core/GlyphsCore/GSLayer/allNodesCount) — The number of nodes in all path shapes.
- [`GSLayer indexPathOfNode:`](/Core/GlyphsCore/GSLayer/indexPathOfNode:) — Returns the index path of a node in this layer.
- [`GSLayer.selNode`](/Core/GlyphsCore/GSLayer/selNode) — The selected node when exactly one node is selected.
- [`GSLayer sortedSelectedNodes`](/Core/GlyphsCore/GSLayer/sortedSelectedNodes) — The selected nodes in path order.

