[#BloombergLP-bdljsn-JsonArray-insert-0c]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdljsn.adoc[bdljsn]::xref:BloombergLP/bdljsn/JsonArray.adoc[JsonArray]::insert
:relfileprefix: ../../../
:mrdocs:

Insert at the specified `position` in this `JsonArray` a copy of the specified `json`, and return an iterator referring to the newly inserted element&period; If an exception is thrown, `&ast;this` is unaffected&period; Throw `bsl&colon;&colon;length&lowbar;error` if `size() &equals;&equals; maxSize()`&period; The behavior is undefined unless `position` is an iterator in the range `&lsqb;begin() &period;&period; end()&rsqb;` (both endpoints included)&period;

== Synopsis

Declared in `&lt;bdljsn&lowbar;json&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdljsn/JsonArray/Iterator-0d.adoc[JsonArray::Iterator]
insert(
    xref:BloombergLP/bdljsn/JsonArray/ConstIterator.adoc[ConstIterator] position,
    xref:BloombergLP/bdljsn/Json.adoc[Json] const& json);
----


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