Page 1 of 1

Deep copy

Posted: Sun Jun 06, 2021 3:38 pm
by Homewarriors
If I use util.table.deepcopy , can I change the parameters and if so, how

Re: Deep copy

Posted: Sun Jun 06, 2021 5:22 pm
by eradicator

Code: Select all

local new = util.table.deepcopy(data.raw['foo']['bar'])
new. name = 'newname'
new. whatever = 42
data:extend{new}