title: Firestore cloud functions - access variable in path
body: <p>So I have this architecture in my db : <code>test1/{test1Id}/test2/{test2Id}</code></p>
  
  <p>I want to interact with my DB in cloud functions whenever a new one is added :</p>
  
  <pre><code>exports.test = functions.firestore
    .document('test1/{test1Id}/test2/{test2Id}')
    .onCreate(async (testsnap, context) =&gt; {
      console.log(testsnap.id);
      console.log(test1Id);
    });
  </code></pre>
  
  <p>but <code>test1Id</code> is then <code>undefined</code>. How can I access it ?</p>
  
  <p>Thanks ahead.</p>