[#BloombergLP-bdljsn-JsonObject-insert-032] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdljsn.adoc[bdljsn]::xref:BloombergLP/bdljsn/JsonObject.adoc[JsonObject]::insert :relfileprefix: ../../../ :mrdocs: `insert` overloads == Synopses Declared in `<bdljsn_json.h>` Move‐insert the specified `member` if its key is not already present. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/pair-0b.adoc[bsl::pair<JsonObject::Iterator, bool>] xref:BloombergLP/bdljsn/JsonObject/insert-05.adoc[insert](xref:BloombergLP/bslmf/MovableRef.adoc[bslmf::MovableRef<Member>] member); ---- [.small]#xref:BloombergLP/bdljsn/JsonObject/insert-05.adoc[_» more..._]# Insert members from the specified `memberInitializers`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdljsn/JsonObject.adoc[JsonObject]& xref:BloombergLP/bdljsn/JsonObject/insert-031.adoc[insert](std::initializer_list<JsonObject_MemberInitializer> memberInitializers); ---- [.small]#xref:BloombergLP/bdljsn/JsonObject/insert-031.adoc[_» more..._]# Insert the specified `member` if its key is not already present. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/pair-0b.adoc[bsl::pair<JsonObject::Iterator, bool>] xref:BloombergLP/bdljsn/JsonObject/insert-0d.adoc[insert](xref:BloombergLP/bdljsn/JsonObject/Member.adoc[Member] const& member); ---- [.small]#xref:BloombergLP/bdljsn/JsonObject/insert-0d.adoc[_» more..._]# Insert members from the range `[first, last)]`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class t_INPUT_ITERATOR> xref:BloombergLP/bdljsn/JsonObject.adoc[JsonObject]& xref:BloombergLP/bdljsn/JsonObject/insert-0b.adoc[insert]( t_INPUT_ITERATOR first, t_INPUT_ITERATOR last) requires !bsl::is_convertible<t_INPUT_ITERATOR, bsl::string_view>::value; ---- [.small]#xref:BloombergLP/bdljsn/JsonObject/insert-0b.adoc[_» more..._]# Insert a member constructed from `key` and `value` if `key` is new. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class t_VALUE> xref:bsl/pair-0b.adoc[bsl::pair<JsonObject::Iterator, bool>] xref:BloombergLP/bdljsn/JsonObject/insert-01.adoc[insert]( std::string_view const& key, t_VALUE&& value); ---- [.small]#xref:BloombergLP/bdljsn/JsonObject/insert-01.adoc[_» more..._]# == Return Value * a pair of an iterator to the element and a `bool` that is `true` if inserted * an iterator referring to the newly inserted element * a reference providing modifiable access to this object == Parameters [cols="1,4"] |=== | Name| Description | *member* | key/value pair to insert | *memberInitializers* | initializer‐list of members | *first* | beginning of the source range | *last* | end of the source range | *key* | UTF‐8 member name | *value* | member value |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#