untuk loop di snapshot firebase di java
FirebaseDatabase database = FirebaseDatabase.getInstance();
DatabaseReference myRef = database.getReference();
myRef.addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(DataSnapshot dataSnapshot) {
for(DataSnapshot item_snapshot:dataSnapshot.getChildren()) {
Log.d("item id ",item_snapshot.child("item_id").getValue().toString());
Log.d("item desc",item_snapshot.child("item_desc").getValue().toString());
}
}
}
Unusual Unicorn