Home > @firebase/firestore > lite > QuerySnapshot > forEach
QuerySnapshot.forEach() method
Enumerates all of the documents in the QuerySnapshot
.
Signature:
forEach(callback: (result: QueryDocumentSnapshot<T>) => void, thisArg?: unknown): void;
Parameters
Parameter | Type | Description |
---|---|---|
callback | (result: QueryDocumentSnapshot<T>) => void | A callback to be called with a QueryDocumentSnapshot for each document in the snapshot. |
thisArg | unknown | The this binding for the callback. |
Returns:
void