---
title: next()
framework: foundation
role: symbol
role_heading: Instance Method
path: foundation/nsdictionary/iterator/next()
---

# next()

Returns the next key-value pair of a dictionary object as a tuple.

## Declaration

```swift
final func next() -> (key: Any, value: Any)?
```

## Discussion

Discussion If all key-value pairs have been iterated over, this method returns nil.
