What is this array called ...
This is not an array. This is an object. An array is an ordered set of records defined by an index value (number). An object (in JavaScript) is a collection of unordered key / value pairs.
... and how to remove items from it
To remove a property from an object, you use delete , specifying the property either with a squared syntax and a string expression for the property name (which can be a reference to a variable, for example, to your option_label ):
delete options[option_label]; // or delete options["some property name"]; // or delete options["some " + " property" + "name"];
... or with the dotted syntax and property name literal:
delete options.someLiteralPropertyName;
.pop does not exist for objects, because objects have no order, so the concept of the "last" record of an object does not make sense.
source share