File: access_array.md

package info (click to toggle)
mongo-cxx-driver 4.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 13,832 kB
  • sloc: cpp: 61,365; python: 1,436; sh: 356; xml: 253; perl: 215; makefile: 21
file content (25 lines) | stat: -rw-r--r-- 565 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# 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