[#nlohmann-basic_json-00-insert-0d6]
= xref:nlohmann.adoc[nlohmann]::xref:nlohmann/basic_json-00.adoc[basic&lowbar;json]::insert
:relfileprefix: ../../
:mrdocs:

inserts element into array

== Synopsis

Declared in `&lt;nlohmann&sol;json&period;hpp&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:nlohmann/basic_json-00/iterator.adoc[iterator]
insert(
    xref:nlohmann/basic_json-00/const_iterator.adoc[const&lowbar;iterator] pos,
    xref:nlohmann/basic_json-00.adoc[basic&lowbar;json] const& val);
----

== Return Value

an iterator for a basic&lowbar;json container

== Parameters

[cols="1,4"]
|===
| Name| Description
| *pos*
| a const iterator for a basic&lowbar;json container
| *val*
| a class to store JSON values
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
