I am following [this](https://www.youtube.com/watch?v=0ofkvm97i0s) tutorial to fill a List from an array in firestore. However I get the error that foreach is not applicable to type "DataSnapshot"

I followed the tutorial exactly and am unsure what could cause this error.

Here is what I have:

```java
private void readData(final MyCallback callback){
        docRef.get().addOnCompleteListener(new OnCompleteListener<DocumentSnapshot>() {
            @Override
            public void onComplete(@NonNull Task<DocumentSnapshot> task) {
                if (task.isSuccessful()) {
                    for (DocumentSnapshot document : task.getResult()){
                        String group = document.getString("following");
                        followingList.add(group);
                    }
                    callback.onCallback(followingList);
                } else {
                }
            }
        });
    }

 private interface MyCallback {
     void onCallback(List<String> list);
 }

```

I should be able to fill the List from this method but it is not compiling with the error:

```
error: for-each not applicable to expression type
required: array or java.lang.Iterable
found:    DocumentSnapshot

```