> x[1] = {twist: 3};
> alert( x.toSource() ); // [{test:1}, {twist:3}]

My test case was broken! When I change it to this:

var x = [ {test:1}, {toast:2} ];
var y = $.extend(true, [], x);
x[1].toast = 3;
alert( y.toSource() );

I get the expected output:

[{test:1}, {toast:2}]

That is, x was deep-extended to y and a change to x didn't affect y.

So it seems like that should work. Can you show more of the code?
-- 
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-...@googlegroups.com.
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en.


Reply via email to