[#BloombergLP-bdljsn-JsonArray-erase-01]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdljsn.adoc[bdljsn]::xref:BloombergLP/bdljsn/JsonArray.adoc[JsonArray]::erase
:relfileprefix: ../../../
:mrdocs:

Erase the elements in the range `&lsqb;first, last)&rsqb;`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdljsn/JsonArray/Iterator-0d.adoc[JsonArray::Iterator]
erase(
    xref:BloombergLP/bdljsn/JsonArray/ConstIterator.adoc[ConstIterator] first,
    xref:BloombergLP/bdljsn/JsonArray/ConstIterator.adoc[ConstIterator] last);
----

== Description

Remove from this `JsonArray` the sequence of elements starting at the specified `first` position and ending before the specified `last` position, and return an iterator providing modifiable access to the element immediately following the last removed element, or the position returned by the method `end` if the removed elements were last in the sequence&period; The behavior is undefined unless `first` is an iterator in the range `&lsqb;cbegin() &period;&period; cend()&rsqb;` (both endpoints included) and `last` is an iterator in the range `&lsqb;first &period;&period; cend()&rsqb;` (both endpoints included)&period;

== Return Value

an iterator to the element following the last removed element

== Parameters

[cols="1,4"]
|===
| Name| Description
| *first*
| beginning of the erase range
| *last*
| end of the erase range
|===


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