title: Retrieving all the passenger id (user id) inside the driver's passengerRequest node in Firebase and Android Studio
body: <p>I'm trying to retrieve and convert it to strings the UserIDs that are being saved within the driver's passengerRequest like in this picture:</p>
  
  <p><a href="https://imgur.com/a/F6matnZ" rel="nofollow noreferrer">https://imgur.com/a/F6matnZ</a></p>
  
  <p>here is my getAssignPassenger</p>
  
  <pre><code>private void getAssignedPassenger() {
      String driverID = FirebaseAuth.getInstance().getCurrentUser().getUid();
      DatabaseReference ref = FirebaseDatabase.getInstance().getReference().child("Users").child("Driver").child(driverID).child("passengerRequest");
      ref.addValueEventListener(new ValueEventListener() {
          @Override
          public void onDataChange(DataSnapshot dataSnapshot) {
              if (dataSnapshot.exists()) {
  
                  passengerID = dataSnapshot.getValue().toString();
                  getAssignPassengerPickUpLocation();
              }else{
                  passengerID = "";
                  if(pickupMarker !=null){
                      pickupMarker.remove();
                  }
                  if(AssignPassengerPickupLocationListener!= null){
                  AssignPassengerPickupLocationref.removeEventListener(AssignPassengerPickupLocationListener);
              }}
          }
  
          @Override
          public void onCancelled(DatabaseError databaseError) {
  
          }
      });
  }
  </code></pre>
  
  <p>my problem is here in this block</p>
  
  <pre><code>DatabaseReference ref = FirebaseDatabase.getInstance().getReference().child("Users").child("Driver").child(driverID).child("passengerRequest");
      ref.addValueEventListener(new ValueEventListener() {
          @Override
          public void onDataChange(DataSnapshot dataSnapshot) {
              if (dataSnapshot.exists()) {
  
                  passengerID = dataSnapshot.getValue().toString();
                  getAssignPassengerPickUpLocation();
  </code></pre>
  
  <p>in the passengerID it should retrieve every userIDs that are saved in there...
  how do I that?</p>
  
  <p>Next problem is... IF I successfully retrieved the userIDs and how do I continue it in finding their location, here is picture of the node:</p>
  
  <p><a href="https://imgur.com/1TQQ4Ih" rel="nofollow noreferrer">https://imgur.com/1TQQ4Ih</a> </p>
  
  <p>I already started the codes for it </p>
  
  <p>here is my getAssignPassengerLocation</p>
  
  <pre><code>private void getAssignPassengerPickUpLocation() {
  
      AssignPassengerPickupLocationref = FirebaseDatabase.getInstance().getReference().child("passengerRequest").child(passengerID).child("l");
      AssignPassengerPickupLocationListener = AssignPassengerPickupLocationref.addValueEventListener(new ValueEventListener() {
          @Override
          public void onDataChange(DataSnapshot dataSnapshot) {
              if (dataSnapshot.exists()&amp;&amp;!passengerID.equals("")) {
                  List&lt;Object&gt; map = (List&lt;Object&gt;) dataSnapshot.getValue();
                  double locationLat = 0;
                  double locationLong = 0;
  
                  if (map.get(0) != null) {
                      locationLat = Double.parseDouble(map.get(0).toString());
                  }
                  if (map.get(1) != null) {
                      locationLong = Double.parseDouble(map.get(1).toString());
                  }
                  LatLng driverLatLng = new LatLng(locationLat, locationLong);
  
                  mMap.addMarker(new MarkerOptions().position(driverLatLng).title("Pickup Location").icon(BitmapDescriptorFactory.fromResource(R.mipmap.ic_launcher_pickup_marker)));
  </code></pre>
  
  <p>what should I do in this block </p>
  
  <pre><code>AssignPassengerPickupLocationref = FirebaseDatabase.getInstance().getReference().child("passengerRequest").child(passengerID).child("l");
      AssignPassengerPickupLocationListener = AssignPassengerPickupLocationref.addValueEventListener(new ValueEventListener() {
          @Override
          public void onDataChange(DataSnapshot dataSnapshot) {
              if (dataSnapshot.exists()&amp;&amp;!passengerID.equals("")) {
                  List&lt;Object&gt; map = (List&lt;Object&gt;) dataSnapshot.getValue();
                  double locationLat = 0;
                  double locationLong = 0;
  </code></pre>
  
  <p>is it possible to store the nodes in an Array String? </p>