bson_has_field() — libbson 1.6.3

- libbson 1.6.3 »
- API Reference »
- bson_t

# bson_has_field()

## Synopsis

    bool
    bson_has_field (const bson_t *bson, const char *key);

## Parameters

- `bson`: A bson_t.
- `key`: A string containing the name of the field to check for.

## Description

Checks to see if key contains an element named `key`. This also accepts "dotkey" notation such as "a.b.c.d".

## Returns

true if `key` was found within `bson`; otherwise false.

Created using Sphinx 1.5.3, based on Sphinx Readable Theme.