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

Insert the specified `member` if its key is not already present&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/pair-0b.adoc[bsl::pair&lt;JsonObject::Iterator, bool&gt;]
insert(xref:BloombergLP/bdljsn/JsonObject/Member.adoc[Member] const& member);
----

== Description

Insert the specified `member` into this `JsonObject` if the key (the `first` element) of the object referred to by `value` does not already exist in this `JsonObject`&semi; otherwise, this method has no effect&period; Return a `pair` whose `first` member is an iterator referring to the (possibly newly inserted) `value&lowbar;type` object in this `JsonObject` whose key is equivalent to that of the object to be inserted, and whose `second` member is `true` if a new value was inserted, and `false` if a value having an equivalent key was already present&period; The behavior is undefined unless `member&period;first` is valid UTF&hyphen;8 (see `bdlde&colon;&colon;Utf8Util&colon;&colon;isValid`)&period;

== Return Value

a pair of an iterator to the element and a `bool` that is `true` if inserted

== Parameters

[cols="1,4"]
|===
| Name| Description
| *member*
| key&sol;value pair to insert
|===


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