[#BloombergLP-bdljsn-JsonObject-erase-06] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdljsn.adoc[bdljsn]::xref:BloombergLP/bdljsn/JsonObject.adoc[JsonObject]::erase :relfileprefix: ../../../ :mrdocs: Erase the member with the specified `key`, if present. == Synopsis Declared in `<bdljsn_json.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- std::size_t erase(std::string_view const& key); ---- == Description Remove from this `JsonObject` the `Member` object having the specified `key`, if it exists, and return 1; otherwise (there is no object with a key equivalent to `key` in this `JsonObject`) return 0 with no other effect. This method invalidates only iterators and references to the removed element and previously saved values of the `end()` iterator, and preserves the relative order of the elements not removed. == Return Value the number of members erased (0 or 1) == Parameters [cols="1,4"] |=== | Name| Description | *key* | UTF‐8 member name |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#