Deep copy of spin object

Hi Camunda users!

I would like to make a deep copy of a spin object in a mutli-instance task. In an inline scripting task I tried var newspin=JSON.parse(JSON.stringify(spinobject)) but it didn’t work. Any idea how to make a deep copy?

Best regards,
Chris

Found the answer, the trick is to do:
var copy_object=S(original_object.toString())

Cheers,
Ch.

1 Like