using for-loop with datasnapshot ,can't get the value i want plz help thanks : <p> hi I am new in android studio , having a question,and confusing me whole afternoon.**strong text**I want to get value in picture col,</p>

     `DatabaseReference GetDestination_Order = FirebaseDatabase.getInstance().getReference("results").child(x).child("destination_order");
            GetDestination_Order.addValueEventListener(new ValueEventListener() {
                @Override
                public void onDataChange(DataSnapshot dataSnapshot) {
                    destination_order.clear();
                    for (DataSnapshot Snapshot : dataSnapshot.getChildren()) {
                        int data = Snapshot.getValue(Integer.class);
                        String im_or = String.valueOf(data);
                        destination_order.add(im_or);
                    }
                    pass_Destination_order(destination_order);
                }

                @Override
                public void onCancelled(DatabaseError databaseError) {
                    throw databaseError.toException();
                }
            });`
<p>I can get destination_order like 
destination_order: [81, 95, 93, 96, 2]
destination_order: [0, 1, 2, 3, 4, 5, 6]</p>
    `public void pass_Destination_order(final ArrayList<String> destination_order) {
        
        for (int n = 0; n < destination_order.size(); n++) {

            String x = destination_order.get(n);

            DatabaseReference myRef1 = FirebaseDatabase.getInstance("---firebaseurl---").getReference("travel").child("0").child("result").child(x).child("picture");
            Log.e("url-x", x);
            ValueEventListener valueEventListener = myRef1.addValueEventListener(new ValueEventListener() {
                @Override
                public void onDataChange(DataSnapshot dataSnapshot) {
                    murl="";

                    datatest = dataSnapshot.getValue(String.class);
                    Log.e("url", String.valueOf(datatest));
                    if (count == 0) {
                        murl += datatest;
                        getImages(murl);`enter code here`
                        
                    }
                    if(count==destination_order.size()-1){
                        count=0;}
                    else
                        count++;
                }

                @Override
                public void onCancelled(DatabaseError databaseError) {
                    throw databaseError.toException();
                }
            });
        }`
<p>I hope to get the picture url ordered by [81, 95, 93, 96, 2]
,but the myurl i get was messed.
why not first myurl belong to 81?  the output/log is below. thanks!</p>
[logcatpicture][1]


  [1]: https://i.stack.imgur.com/EZCTn.jpg