[#nlohmann-basic_json-0c-emplace] = xref:nlohmann.adoc[nlohmann]::xref:nlohmann/basic_json-0c.adoc[basic_json]::emplace :relfileprefix: ../../ :mrdocs: add an object to an object if key does not exist == Synopsis Declared in `<nlohmann/json.hpp>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class... Args> std::pair<iterator, bool> emplace(Args&&... args); ---- == Return Value pair of an iterator to the element that was inserted, or that already existed with the same key, and a `bool` denoting whether the insertion took place == Parameters [cols="1,4"] |=== | Name| Description | *args* | arguments forwarded to construct the new key‐value pair in place |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#