Back to Json

nlohmann::basic_json::begin

docs/mkdocs/docs/api/basic_json/begin.md

3.12.0662 B
Original Source

<small>nlohmann::basic_json::</small>begin

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.

Examples

??? 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.