title: i have a firebase databse from which i want to access some nested nodes then add a list of data to that particular node
body: <p>I have a firebase DB whose structure is like this :
  <a href="https://i.stack.imgur.com/6HYqy.png" rel="nofollow noreferrer">databse structure</a></p>
  
  <p>The pages node is a list of an array as [0,1,2,3...]. Now I want to get the reference to the each pages node child "data" and then the child node "meetingRooms" and then add a new child node in "meetingRooms" node which will be again a list of the "pages" node.</p>
  
  <p>This is the code that i have tried so far
  //for reference to databse</p>
  
  <pre><code> mMeetingRoomsDatabaseReference = FirebaseDatabase.getInstance().getReference("/pages").child("/data");
  </code></pre>
  
  <p>then to add data to Firebase :</p>
  
  <pre><code>public void updateBookings(){
      String startTime = "9:00 am";
      String endTime = "11:00 am";
      Map&lt;String,Object&gt; values = new HashMap&lt;&gt;();
      values.put("startTime" , startTime);
      values.put("endTime" , endTime);
      values.put("bookingRoomId" , meetingRoomId);
      values.put("date" , resultDate);
      values.put("userUid" , userGoogleId);
      DatabaseReference ref = mMeetingRoomsDatabaseReference.child("/meetingRooms").child("bookings");
      ref.push().updateChildren(values);
  }
  </code></pre>
  
  <p>then calling this method on a button click.
  this is adding a completely new node to the "pages" node in the firebase like this : 
  <a href="https://i.stack.imgur.com/g3p0G.png" rel="nofollow noreferrer">after adding the data the firebase structure is this.</a></p>
  
  <p>can anyone help me out that what I am doing wrong here? Help would be really appreciated.</p>