<?xml version="1.0"?>
<page xmlns="http://projectmallard.org/1.0/"
      type="topic"
      style="function"
      xmlns:api="http://projectmallard.org/experimental/api/"
      xmlns:ui="http://projectmallard.org/experimental/ui/"
      id="bson_iter_find_descendant">
  <info>
    <link type="guide" xref="bson_iter_t" group="function"/>
  </info>
  <title>bson_iter_find_descendant()</title>

  <section id="synopsis">
    <title>Synopsis</title>
    <synopsis><code mime="text/x-csrc"><![CDATA[bool
bson_iter_find_descendant (bson_iter_t *iter,
                           const char  *dotkey,
                           bson_iter_t *descendant);
]]></code></synopsis>
  </section>

  <section id="parameters">
    <title>Parameters</title>
    <table>
      <tr><td><p>iter</p></td><td><p>A <code xref="bson_iter_t">bson_iter_t</code>.</p></td></tr>
      <tr><td><p>dotkey</p></td><td><p>A dot-notation key like <code>"a.b.c.d"</code>.</p></td></tr>
      <tr><td><p>descendant</p></td><td><p>A <code xref="bson_iter_t">bson_iter_t</code>.</p></td></tr>
    </table>
  </section>

  <section id="description">
    <title>Description</title>
    <p>The <code xref="bson_iter_find_descendant">bson_iter_find_descendant()</code> function shall follow standard MongoDB dot notation to recurse into subdocuments. <code>descendant</code> will be initialized and advanced to the descendant. If false is returned, both <code>iter</code> and <code>descendant</code> should be considered invalid.</p>
  </section>

  <section id="return">
    <title>Returns</title>
    <p>true is returned if the requested key was found. If not, false is returned and <code>iter</code> was exhausted and should now be considered invalid.</p>
  </section>
</page>
