I have found a solution for this: function clone(s) { for(p in s) this[p] = (typeof(s[p]) == 'object')? new clone(s[p]) : s[p]; } cloneObj= new...
Hi, the problem is I don't know how to do it. It would be helpful to have an example.
Hi Thanks. It still doesn't seem to work. Can you please share an example.
Hi, I have a javascript object. I pass it to a function where certain attributes are changed and displayed on screen. Once I am out of that...
I thought I should be eloborate in providing the requirement. Assume my JSON object is like ths: The name of the object is 'Emp' The...
A correction : "I need to access" -> I need to obtain the attribute names in a local variable
Hi, I have a JSON object whose structure is like this: The name of the object is 'Emp' and the attributes are: name age sex department...
I have found a solution for this. We can use tmp = eval( "(tmpObj." + fieldname+ ")"); This will fetch the value dynamically
Hi, I have a statement like var a = {}; Does that mean a is an object or an array? Also, later in the code I have something like...
Separate names with a comma.