<?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">
  <info>
    <link type="guide" xref="bson_iter_t" group="function"/>
  </info>
  <title>bson_iter_find()</title>

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

  <section id="parameters">
    <title>Parameters</title>
    <table>
      <tr><td><p>iter</p></td><td><p>A <link xref="bson_iter_t">bson_iter_t</link>.</p></td></tr>
      <tr><td><p>key</p></td><td><p>A string containing the requested key.</p></td></tr>
    </table>
  </section>

  <section id="description">
    <title>Description</title>
    <p>The <code>bson_iter_find()</code>function shall advance <code>iter</code>to the element named <code>key</code>or exhaust all elements of <code>iter</code>. If <code>iter</code>is exhausted, false is returned and <code>iter</code>should be considered invalid.</p>
    <p><code>key</code> is case-sensitive. For a case-folded version, see <link xref="bson_iter_find_case">bson_iter_find_case()</link>.</p>
  </section>

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