iterator

abstract operator fun iterator(): Iterator<BsonDocument.Field>(source)

Iterates over the fields in this document.

Each pair is the name of a field and its value.

The iteration order of a BSON document is preserved: fields appear in the same order as they are written in.