---
name: "bson_iter_find_descendant"
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_find_descendant"
---

# bson\_iter\_find\_descendant(3)

## SYNOPSIS

```
bool
bson_iter_find_descendant (bson_iter_t *iter,
                           const char *dotkey,
                           bson_iter_t *descendant);
```

## PARAMETERS

- •

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

- •

  **dotkey**: A dot-notation key like **"a.b.c.d"**.

- •

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

## DESCRIPTION

The *bson\_iter\_find\_descendant()* function shall follow standard MongoDB dot notation to recurse into subdocuments. **descendant** will be initialized and advanced to the descendant. If false is returned, both **iter** and **descendant** should be considered invalid.

## RETURNS

true is returned if the requested key was found. If not, false is returned and **iter** was exhausted and should now be considered invalid.

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
