I have a result set which is an array of objects. I need to clone this so I can make changes to it, without touching the original data.
var data = w2ui.grid.
ES6:
If you want to have cloned objects too, you have to spread array and objects:
const newArrayOfObjects = [ ...originalArrayOfObject ].map(i => ({ ...i}));