---
name: "bson_iter_value"
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_value"
---

# bson\_iter\_value(3)

## SYNOPSIS

```
const bson_value_t *
bson_iter_value (bson_iter_t *iter);
```

## PARAMETERS

- •

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

## DESCRIPTION

Fetches the value for the currently observed type as a boxed type. This allows passing around the value without knowing the type at runtime.

If the *bson\_iter\_t* is further modified, the *bson\_value\_t* is invalidated.

## RETURNS

A *bson\_value\_t* that should not be modified or freed.

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
