
<h1 id="operator []">
 <a href="#/api/json/operator_brackets" class="anchor">
   <span>operator []</span>
  </a>
</h1>

<div class="signature">

<hr>

  <div class="definition-container">
    <div class="definition">
      <code class="desktop-only"><a href="#/api/json/">occa::json</a>&amp; operator [] (<span class="token keyword">const</span> <span class="token keyword">std::string</span> &amp;s)</code>
      <code class="mobile-only"><a href="#/api/json/">occa::json</a>&amp; operator [] (
    <span class="token keyword">const</span> <span class="token keyword">std::string</span> &amp;s
)</code>
      <div class="flex-spacing"></div>
      <a href="https://github.com/libocca/occa/blob/7d02eac1/include/occa/types/json.hpp#L685" target="_blank">Source</a>
    </div>
    
  </div>

  <div class="definition-container">
    <div class="definition">
      <code class="desktop-only"><span class="token keyword">const</span> <a href="#/api/json/">occa::json</a>&amp; operator [] (<span class="token keyword">const</span> <span class="token keyword">std::string</span> &amp;s)</code>
      <code class="mobile-only"><span class="token keyword">const</span> <a href="#/api/json/">occa::json</a>&amp; operator [] (
    <span class="token keyword">const</span> <span class="token keyword">std::string</span> &amp;s
)</code>
      <div class="flex-spacing"></div>
      <a href="https://github.com/libocca/occa/blob/7d02eac1/include/occa/types/json.hpp#L692" target="_blank">Source</a>
    </div>
    <div class="description">

      <div>
        ::: markdown Return the object value given by key `s` :::
      </div>
</div>
  </div>

<hr>

  <div class="definition-container">
    <div class="definition">
      <code class="desktop-only"><a href="#/api/json/">occa::json</a>&amp; operator [] (<span class="token keyword">const</span> <span class="token keyword">int</span> n)</code>
      <code class="mobile-only"><a href="#/api/json/">occa::json</a>&amp; operator [] (
    <span class="token keyword">const</span> <span class="token keyword">int</span> n
)</code>
      <div class="flex-spacing"></div>
      <a href="https://github.com/libocca/occa/blob/7d02eac1/include/occa/types/json.hpp#L704" target="_blank">Source</a>
    </div>
    
  </div>

  <div class="definition-container">
    <div class="definition">
      <code class="desktop-only"><span class="token keyword">const</span> <a href="#/api/json/">occa::json</a>&amp; operator [] (<span class="token keyword">const</span> <span class="token keyword">int</span> n)</code>
      <code class="mobile-only"><span class="token keyword">const</span> <a href="#/api/json/">occa::json</a>&amp; operator [] (
    <span class="token keyword">const</span> <span class="token keyword">int</span> n
)</code>
      <div class="flex-spacing"></div>
      <a href="https://github.com/libocca/occa/blob/7d02eac1/include/occa/types/json.hpp#L709" target="_blank">Source</a>
    </div>
    <div class="description">

      <div>
        ::: markdown Return the value at array on index `n` :::
      </div>
</div>
  </div>

  <hr>
</div>


<h2 id="description">
 <a href="#/api/json/operator_brackets?id=description" class="anchor">
   <span>Description</span>
  </a>
</h2>

Access data if it's an object or array.
