baeyeongbin
baeyeongbin

Reputation: 49

JavaScript I want Change only part of the List element

var saveList = [].concat(caller.gridView01.getData("modified"));
        saveList = saveList.concat(caller.gridView01.getData("deleted"));
        saveList = saveList.concat(caller.gridView02.getData("deleted"));

        var test = caller.gridView02.getData("deleted");
         console.log("testList",test);

console.log("testList",test);

enter image description here

enter image description here

What I want is that the object is stored as an element in the list named test, but I want to change only a part of the object's interior. To be precise, __deleted__: false I want to change to true and __modified__: true to false It is possible to delete or insert an element itself, but I don't know how to control the inside of the element! Is it possible?

Upvotes: 0

Views: 107

Answers (1)

ᴓᴓᴓ
ᴓᴓᴓ

Reputation: 1166

Yes, like this:

test[0].__modified__ = true;
test[0].__deleted__ = true;

Upvotes: 1

Related Questions