[#nlohmann-basic_json-0c-insert-0f] = xref:nlohmann.adoc[nlohmann]::xref:nlohmann/basic_json-0c.adoc[basic_json]::insert :relfileprefix: ../../ :mrdocs: inserts copies of element into array == Synopsis Declared in `<nlohmann/json.hpp>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:nlohmann/basic_json-0c/iterator.adoc[iterator] insert( xref:nlohmann/basic_json-0c/const_iterator.adoc[const_iterator] pos, xref:nlohmann/basic_json-0c/size_type.adoc[size_type] cnt, xref:nlohmann/basic_json-0c.adoc[basic_json] const& val); ---- == Return Value iterator pointing to the first element inserted, or _pos_ if _cnt_ is `0` == Parameters [cols="1,4"] |=== | Name| Description | *pos* | iterator before which the elements will be inserted | *cnt* | number of copies to insert | *val* | element to insert |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#