There is this class contentItem. The instance has been
created alright and all the properties, except for "maincopy", has
been set successfully. Now when I loop through my xml (the real
path to xml nodes have been removed for better legibility), the
object in the class is not being assigned properly. Actually, it
seems, like it is not being assigned at all.....
why undefined? it traces the "props" in "obj[props]"
thanks for the help.
It still doesn't seem to work like I want it to. My goal is
to be able to read the property of the class like this:
With regard to your comment I have changed the function, but
it doesn't assign the temp.maincopy to obj, whereas object has all
the properties and their values set correctly (I check it with the
for--in loop). Certainly, I could have avoided using k, v and obj
variables, they serve the legibility issue only. Here is again the
code, which doesn't assign the properties and their values to an
object in a class: