ReadonlyexistsTrue if the document exists.
ReadonlyidThe ID of the document for which this DocumentSnapshot contains data.
ReadonlymetadataMetadata about this snapshot concerning its source and if it has local modifications.
ReadonlyrefA DocumentReference to the document location.
Retrieves all fields in the document as an Object. Returns 'undefined' if the document doesn't exist.
An Object containing all fields in the document or 'undefined' if the document doesn't exist.
Retrieves the field specified.
Field value or null.
Checks whether this DocumentSnapshot is equal to the provided one.
Snapshot to compare.
True if equal, false otherwise.
A
DocumentSnapshotcontains data read from a document in your database. The data can be extracted with.data()or.get(<field>)to get a specific field.