File: access_array.md

package info (click to toggle)
mongo-cxx-driver 4.1.4-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 14,632 kB
  • sloc: cpp: 60,864; python: 962; sh: 496; xml: 253; perl: 94; makefile: 22
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