---
title: length
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/nsindexpath/length
---

# length

The number of nodes in the index path.

## Declaration

```swift
var length: Int { get }
```
