I have the following function that I did in Java, it solves my problem, however I want to play with javascript as well. So I had the following problem: I only found functions that retrieve unique values, and I wanted a function similar to dataSnapshot.getChildren() that has in Java only that for JavaScript, if not, what would be the alternative?
To understand better, I'll leave the Java code here that works perfectly.
mRef.addListenerForSingleValueEvent(new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
for (DataSnapshot ds : dataSnapshot.getChildren()) {
float okk = Float.valueOf(ds.child("value").getValue(String.class))/100000000;
prov += ds.child("wallet").getValue(String.class)+", "+String.format(Locale.US,"%.8f", okk)+"\n";
ds.getRef().removeValue();
}
tx_array.setText(prov);
}
@Override
public void onCancelled(@NonNull DatabaseError databaseError) {
}
});
The output will have to look like this, the same is in java.
39Hs93m61zYCaiaNe8yzgrDcutVAz2Kgdc, 0.00151515 3QMTHAaYcQB8kJxF5nxxBwskyCFukCNH8t, 0.00151515 3AcNSeB9DX3ZKvGxMaec9uZ98rY2BJKuzW, 0.00153787 36SjF1MBm2DE6YimNYiy9T4ez6Z7UA4rpg, 0.001540903 AHr3GF12div1Kgf6DegeiHSGQYssvbmih, 0.00162121 19vR7xchAg1vUgGwATwBsz5NYrVWYKdSQ3, 0.00164545 3KmfDgW9RdWp7P2ns3tydXsiChR5U9XKdT, 0.00165757 1C8rxppQk8mRSWB8xPKZ5DsYVykJBLNhV3, 0.00166212
Database Struct
