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

Insert members from `&lsqb;first, last)&rsqb;` into the held object&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class t&lowbar;INPUT&lowbar;ITERATOR&gt;
xref:BloombergLP/bdljsn/Json.adoc[Json]&
insert(
    t&lowbar;INPUT&lowbar;ITERATOR first,
    t&lowbar;INPUT&lowbar;ITERATOR last)
requires !bsl&colon;&colon;is&lowbar;convertible&lt;t&lowbar;INPUT&lowbar;ITERATOR,
                                                 bsl&colon;&colon;string&lowbar;view&gt;&colon;&colon;value;
----

== Description

Insert into the `JsonObject` held by this object each `Member` in the range `&lsqb;first, last)&rsqb;` whose key is not already present&period; Return a non&hyphen;`const` reference to this object&period; If `isNull()`, then the type is changed to object&period; The behavior is undefined unless `isObject()` or `isNull()`, `first` and `last` refer to a valid sequence, and the keys of all members are valid UTF&hyphen;8 (see `bdlde&colon;&colon;Utf8Util&colon;&colon;isValid`)&period;

== Return Value

a reference providing modifiable access to this object

== Parameters

[cols="1,4"]
|===
| Name| Description
| *first*
| beginning of the source range
| *last*
| end of the source range
|===


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