title: How can I access different wildcard sin a nested match in Firebase Security Rules?
body: <p>If I have a nested match, can I access previous wildcards? In the code below, can I somehow access {nameId} from the innermost match of match /userPosts/{postId}/ ? And if so, how do I differentiate between {nameId} and {postId} ?</p>
  <pre><code>match /general/exercises {
        allow read, write: if false;
  
        match /exerciseNames/{nameId} {
          allow read, write: if true;
  
          match /userPosts/{postId} {
            allow read: if true;
            allow create: if true;
            allow delete, update: if (resource.data == request.auth.uid); // if the request is that of the doc owner uid, then allow delete, update
          }
  </code></pre>
  <p>Or, how about this situation if the nest is not nested?</p>
  <pre><code>match /general/exercises {
        allow read, write: if false;
  
        match /exerciseNames/{nameId}/userPosts/{postId} {
          allow read, write: if true;
          allow delete, update: if (resource.data == request.auth.uid); // if the request is that of the doc owner uid, then allow delete, update
          }
  </code></pre>