[#BloombergLP-bdljsn-JsonObject-erase-03]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdljsn.adoc[bdljsn]::xref:BloombergLP/bdljsn/JsonObject.adoc[JsonObject]::erase
:relfileprefix: ../../../
:mrdocs:

`erase` overloads

== Synopses

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

Erase the member at the specified `position`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdljsn/JsonObject/Iterator-05.adoc[JsonObject::Iterator]
xref:BloombergLP/bdljsn/JsonObject/erase-01.adoc[erase](xref:BloombergLP/bdljsn/JsonObject/ConstIterator.adoc[ConstIterator] position);
----

[.small]#xref:BloombergLP/bdljsn/JsonObject/erase-01.adoc[_» more&period;&period;&period;_]#

Erase the member at the specified `position`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdljsn/JsonObject/Iterator-05.adoc[JsonObject::Iterator]
xref:BloombergLP/bdljsn/JsonObject/erase-02.adoc[erase](xref:BloombergLP/bdljsn/JsonObject/Iterator-05.adoc[Iterator] position);
----

[.small]#xref:BloombergLP/bdljsn/JsonObject/erase-02.adoc[_» more&period;&period;&period;_]#

Erase the member with the specified `key`, if present&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
std::size&lowbar;t
xref:BloombergLP/bdljsn/JsonObject/erase-06.adoc[erase](std::string&lowbar;view const& key);
----

[.small]#xref:BloombergLP/bdljsn/JsonObject/erase-06.adoc[_» more&period;&period;&period;_]#

== Return Value

* an iterator to the element following the last removed element
* the number of members erased (0 or 1)

== Parameters

[cols="1,4"]
|===
| Name| Description
| *position*
| iterator to the member to erase
| *key*
| UTF&hyphen;8 member name
|===


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