PP.delFrom

Syntax

delFrom(jsonObj: Object, arr: Array);

Parameters

jsonObj. Object whose properties will be removed.

arr. Array of properties to be removed.

Description

The delFrom method removes array of specified properties from object.

Example

To execute the example, add a link to PP.js scenario file to HTML page. Specify an object and remove some of the object's properties:

// Determine an object
var chartView = {
    chartType: "pie",
    editMode: 0,
    selectionEnabled: True,
    options: {}
};
// Delete three properties from the object
PP.delFrom(chartView, ["editMode", "selectionEnabled", "options"]);
// Output all object properties
var result = "";
for (var i in chartView) {
    result += chartView[i];
    result += " "
};
console.log("Object properties: " + result);

After executing the example three of the object's four last properties are removed:

Object properties: pie

See also:

PP