# Access a Document Element

## By Iteration

### Basic Example

@snippet api/bsoncxx/examples/bson_documents/access_doc/basic.cpp Example

### Using Iterators

@snippet api/bsoncxx/examples/bson_documents/access_doc/iterators.cpp Example

### Using Algorithms

@snippet api/bsoncxx/examples/bson_documents/access_doc/algorithms.cpp Example

## By Key

### Using find()

@snippet api/bsoncxx/examples/bson_documents/access_doc/find.cpp Example

### Using the Subscript Operator

@snippet api/bsoncxx/examples/bson_documents/access_doc/subscript.cpp Example
