How to remove properties from an object array?

This seems like a great time to use .map()

var var1 = class2.get();
var var2 = var1.map(obj => ({prop1: obj.prop1, prop3: obj.prop3}));

Short, sweet, and does what you want.

MDN docs for .map()


You can delete object property like this e.g.

    var myprop = [
        {prop1: 'A', prop2: "1", prop3: "descr1"},
        {prop1: 'B', prop2: "2", prop3: "descr2"},
        {prop1: 'C', prop2: "3", prop3: "descr3"},
    ];

    myprop = myprop.filter(function (props) {
        delete props.prop2;
        return true;
    });
    console.log(myprop);