nlohmann::basic_json::insert

inserts copies of element into array

Synopsis

Declared in <nlohmann/json.hpp>

iterator
insert(
    const_iterator pos,
    size_type cnt,
    basic_json const& val);

Return Value

iterator pointing to the first element inserted, or pos if cnt is 0

Parameters

NameDescription
positerator before which the elements will be inserted
cntnumber of copies to insert
valelement to insert