Risk-Aware AI Code Review for Business-Critical Systems
LiveReview LiveReview Explore LiveReview

Author

       MongoDB, Inc

Description

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

Parameters

       • bson: A bson_t.

       • key: A string containing the name of the field to check for.

Returns

       true if key was found within bson; otherwise false.

Synopsis

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

return

See Also