BSON_ITER_FIND(3)

πŸ’… BSON_ITER_FIND(3) πŸ’…

okay so this is the libbson manual page for bson_iter_find(), and bestie, it’s lowkey iconic for finding exactly one key in your BSON iterator. no cap. πŸ¦‹


✨ SYNOPSIS ✨

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

πŸŽ€ PARAMETERS πŸŽ€

  • iter β€” A bson_iter_t. the main character iterator we’re moving around πŸ’«
  • key β€” A string containing the requested key. the name you’re hunting for πŸ”Ž

🌸 DESCRIPTION 🌸

The bson_iter_find() function shall advance iter to the first element named key or exhaust all elements of iter. it’s giving β€œgo find your fave and don’t come back until you do” πŸ’…

If iter is exhausted, false is returned and iter should be considered invalid. like, fr fr, that iterator is done-zo after that 😭

Heads up, bestie: key is case-sensitive. For a case-folded version, see bson_iter_find_case(). iykyk 🫢


⭐ RETURNS ⭐

true is returned if the requested key was found. slay. πŸŽ‰

If not, iter was exhausted and should now be considered invalid. not me getting emotionally attached to an iterator that’s literally invalid now πŸ’€


πŸ‘‘ AUTHOR πŸ‘‘

MongoDB, Inc


2009-present, MongoDB, Inc.


mwah πŸ’‹ this cutie is from libbson 2.5.6, dated Oct 09, 2026 β€” catch you in the next manpage, bestie 🌈🫢

πŸ“¦ where this page comes from