Hi! Is there any way to make a deep copy of an obj...
# javascript
g
Hi! Is there any way to make a deep copy of an object of the Any or Object type ? I’ve implemented one but it breaks the == methods despite having the same fields. Thanks in advance
t
serialize/deserialize?
g
image.png,image.png
We can invoke these methods but they don’t even work. I don’t know if it’s expected to begin with and if I’m doing it the right way
So that’s how I’ve done the deepCopy but the equals just doesn’t work, it’d need a custom comparison too
image.png
t
SomeHolder
must be created by constructor
If you want
equals/hashCode
1
g
Yes it’s what I’ve noticed, so there’s no conventional way for the js objects ?
t
Do you want deep equals?