bool bson_has_field (const bson_t *bson, const char *key);
bson
key
Checks to see if key contains an element named key. This also accepts “dotkey” notation such as “a.b.c.d”.
true if key was found within bson; otherwise false.