title: Create array type of push in firebase
body: <p>I'm attempting to create this structure in firebase:</p>
  
  <pre><code>inMinistries
  --uidOfGroup1
  ----0: uidOfGroup1Member
  ----1: uidOfGroup1Member
  ----2: uidOfGroup1Member
  --uidOfGroup2
  ----0: uidOfGroup2Member
  ----1: uidOfGroup2Member
  </code></pre>
  
  <p>In the above example inMinistries is the first node, then we have uidofGroup1 which would be a uid of a Group then I want child nodes to appear like uidOfGroup1Member.  There are several so I can't say exactly how many I need.</p>
  
  <p>Here is my attempt to create the above:</p>
  
  <pre><code>class Firebase {
    constructor() {
      app.initializeApp(firebaseConfig);
  
      this.auth = app.auth();
      this.db = app.database();
      this.storage = app.storage();
    }
  </code></pre>
  
  <p>This is how I set the uidOfGroups</p>
  
  <pre><code>this.db.ref(`inMinistries/${uidOfGroup}`).set('members')
  </code></pre>
  
  <p>I pass a uid value I receive from another call.  I set 'members' so that I could replace it with a group of members later.</p>
  
  <p>I then try to create uidOfGroup1Members, uidOfGroup2Members.  I get stuck on this part.  If I do a set like so:</p>
  
  <pre><code>this.db.ref(`/inMinistries/${uidOfGroup}}`).set(memberId);
  </code></pre>
  
  <p>I can only pass the memberId once, meaning I'd need to have the full list of uidOfGroupMembers which I don't have all at once.  I'd like to be able to push it like I would in an array.  But if I do push:</p>
  
  <pre><code>this.db.ref(`/inMinistries/${uidOfGroup}}`).push(memberId);
  </code></pre>
  
  <p>then it adds an extra uid to the value before like so:
  <a href="https://i.stack.imgur.com/oLs4X.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oLs4X.jpg" alt="enter image description here"></a></p>
  
  <p>Note the above is actually using the uids.  How can I achieve the original desired result I placed on top?</p>