Commit f7cf895c authored by Christian Hergert's avatar Christian Hergert
Browse files

iter: add bson_iter_recurse() to iterate a sub document or array.

This allows you to iterate children documents or arrays on the stack
using another bson_iter_t.

bson_iter_t iter;
bson_iter_t child;

if (bson_iter_init_find(&iter, bson, "key")) {
   if (bson_iter_recurse(&iter, &child)) {
      /* do things with sub document. */
   }
}
parent aca59e77
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment