[#BloombergLP-bslstl-HashTable-09-insertOrAssign]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::xref:BloombergLP/bslstl/HashTable-09.adoc[HashTable&lt;UnorderedMapKeyConfiguration&lt;basic&lowbar;string&lt;char&gt; const, pair&lt;basic&lowbar;string&lt;char&gt; const, Json&gt;&gt;, TransparentHash, TransparentEqualTo, allocator&lt;pair&lt;basic&lowbar;string&lt;char&gt; const, Json&gt;&gt;&gt;]::insertOrAssign
:relfileprefix: ../../../
:mrdocs:

If a key equivalent to the specified `key` already exists in this hash&hyphen;table, assign the specified `obj` to the value associated with that key, load `false` into the specified `isInsertedFlag` and return a pointer to the existing entry&period; Otherwise, insert into this hash&hyphen;table a newly&hyphen;created `value&lowbar;type` object, constructed from `key` and `obj`, load `true` into `isInsertedFlag`, and return a pointer to the newly&hyphen;created entry&period; Use the optionally specified `hint` as a starting place for the search for the existing key&period;

== Synopsis

Declared in `&lt;bslstl&lowbar;hashtable&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class KEY&lowbar;ARG,
    class BDE&lowbar;OTHER&lowbar;TYPE&gt;
xref:BloombergLP/bslalg/BidirectionalLink.adoc[bslalg::BidirectionalLink]*
insertOrAssign(
    bool* isInsertedFlag,
    xref:BloombergLP/bslalg/BidirectionalLink.adoc[bslalg::BidirectionalLink]* hint,
    KEY&lowbar;ARG&& key,
    BDE&lowbar;OTHER&lowbar;TYPE&& obj);
----


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