---
name: "bson_iter_find"
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"
---

# bson\_iter\_find(3)

## SYNOPSIS

```
bool
bson_iter_find (bson_iter_t *iter, const char *key);
```

## PARAMETERS

- •

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

- •

  **key**: A string containing the requested key.

## DESCRIPTION

The **bson\_iter\_find()** function shall advance **iter** to the first element named **key** or exhaust all elements of **iter**. If **iter** is exhausted, false is returned and **iter** should be considered invalid.

**key** is case-sensitive. For a case-folded version, see *bson\_iter\_find\_case()*.

## RETURNS

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

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
