# `GSLayer sortedSelectedNodes`

*Instance Method*

The selected nodes in path order.

## Declaration

```swift
func sortedSelectedNodes() -> [GSNode]
```

```objc
- (NSArray<GSNode *> *) sortedSelectedNodes;
```

```python
sortedSelectedNodes() -> list[GSNode]
```

## Discussion

For partial closed-path selections, wrapped selections are ordered around the path start.

## 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 nodeAtIndexPath:`](/Core/GlyphsCore/GSLayer/nodeAtIndexPath:) — Returns the node at an index path.
- [`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.

