I am using firebase to retrieve data from database n use
Map
to get values, but it
You need to use the getCheldrin as follows
for (DataSnapshot snapshotNode: dataSnapshot.getChildren()) {
map.put(snapshotNode.getKey(), snapshotNode.getValue(YOUR_CLASS_TYPE.class));
}
Replace the YOUR_CLASS_TYPE with the class type you expecting. notice that this class must have an empty constructor.