I have an object, say
O = {
a1: instace_of_another_object,
a2:100,
a3:200
}
my a1 is inherited from another object say X.
How do I serialize and then deserialize O in such a way that I can call
O.a1.some_method() //which is part of X
If that is not possible, I am also Ok to store the object in localstorage proxy(which uses serialization). Is there a way I can "save" the whole object in "browser memory".
Thanks.