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

Insert members from the range `&lsqb;first, last)&rsqb;`&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/JsonObject.adoc[JsonObject]&
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

Create a `Member` object for each iterator in the range starting at the specified `first` iterator and ending immediately before the specified `last` iterator, by converting from the object referred to by each iterator&period; Insert into this `JsonObject` each such object whose key is not already contained&period; Return a non&hyphen;`const` reference to this `JsonObject`&period; The (template parameter) type `t&lowbar;INPUT&lowbar;ITERATOR` shall meet the requirements of an input iterator defined in the C&plus;&plus;11 standard &lsqb;24&period;2&period;3&rsqb;providing access to values of a type convertible to `Member`&period; The behavior is undefined unless `first` and `last` refer to a sequence of value values where `first` is at a position at or before `last`&period; The behavior is undefined unless the keys of all `Member` objects inserted 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]#
