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
Please register or sign in to comment