---
name: "bson_iter_next"
section: "3"
platform: "linux"
package: "libbson-doc"
version: "1.30.4-1+deb13u3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/bson_iter_next"
---

# bson\_iter\_next(3)

## SYNOPSIS

```
bool
bson_iter_next (bson_iter_t *iter);
```

## PARAMETERS

- •

  **iter**: A *bson\_iter\_t*.

## DESCRIPTION

Advances **iter** to the next element in the document.

## RETURNS

true if **iter** was advanced. Returns false if **iter** has passed the last element in the document or encountered invalid BSON.

It is a programming error to use **iter** after this function has returned false.

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
