# Access an Array Element

## By Iteration

### Basic Example

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

### Using Iterators

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

### Using Algorithms

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

## By Key

### Using find()

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

### Using the Subscript Operator

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