title: indexOn for nested data Firebase
body: <p>I can't get the structure for my rules correct so that I can access nested data.
  Here is my raw json:</p>
  <pre><code>{
    &quot;Field1&quot; : &quot;test&quot;,
    &quot;Field2&quot; : &quot;tests&quot;
  },
  &quot;client&quot;: {
      &quot;client_field&quot;: &quot;Test!&quot;
   }
  </code></pre>
  <p>I am trying to do my rules so that I can access the main fields <code>field1</code> <code>field2</code> but also the nested <code>client_field</code></p>
  <p>Here are my rules:</p>
  <pre><code>{
    &quot;rules&quot;: {
      &quot;.read&quot;: &quot;now &lt; 1635274993000&quot;,  // 2021-10-26
      &quot;.write&quot;: &quot;now &lt; 1635274993000&quot;,  // 2021-10-26
        &quot;call&quot;: {
              &quot;.indexOn&quot;:[&quot;field1&quot;, &quot;field2&quot;, &quot;client&quot;]
        },
    }
  }
  </code></pre>
  <p>I have tried a few different ways but can't seem to get the syntax, and get an <code>Error saving rules</code> from Firebase.</p>
  <p>edit:</p>
  <p>My database is structured like so:</p>
  <pre><code>database
  calls
    - &quot;Field1&quot;, &quot;Field2&quot;
       - clients
         - &quot;client field&quot;
  </code></pre>
  <p>So calls is the top level, in each call there is <code>field1</code>, <code>field2</code> and <code>client</code> and client has its nested field <code>client field</code></p>
  <p>I want to be able to <code>indexOn</code> client field, so that I can get data where <code>client field</code> is a specific value.</p>