2021-12-29 15:41:01 +03:00
|
|
|
# <small>nlohmann::basic_json::</small>begin
|
2020-08-12 14:41:59 +03:00
|
|
|
|
|
|
|
|
```cpp
|
|
|
|
|
iterator begin() noexcept;
|
|
|
|
|
const_iterator begin() const noexcept;
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Returns an iterator to the first element.
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
## Return value
|
|
|
|
|
|
|
|
|
|
iterator to the first element
|
|
|
|
|
|
|
|
|
|
## Exception safety
|
|
|
|
|
|
|
|
|
|
No-throw guarantee: this member function never throws exceptions.
|
|
|
|
|
|
|
|
|
|
## Complexity
|
|
|
|
|
|
|
|
|
|
Constant.
|
|
|
|
|
|
2021-12-29 15:41:01 +03:00
|
|
|
## Examples
|
2020-08-12 14:41:59 +03:00
|
|
|
|
|
|
|
|
??? example
|
|
|
|
|
|
|
|
|
|
The following code shows an example for `begin()`.
|
|
|
|
|
|
|
|
|
|
```cpp
|
|
|
|
|
--8<-- "examples/begin.cpp"
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Output:
|
|
|
|
|
|
|
|
|
|
```json
|
|
|
|
|
--8<-- "examples/begin.output"
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Version history
|
|
|
|
|
|
|
|
|
|
- Added in version 1.0.0.
|