---
title: next()
framework: realitykit
role: symbol
role_heading: Instance Method
path: realitykit/queryresult/iterator/next()
---

# next()

Advances to the next entity and returns it.

## Declaration

```swift
mutating func next() -> Element?
```

## Return Value

Return Value Calling this method advances the iterator to the next entity and returns it. If there is no next element, returns nil.
