jquery deep replace
<p>Here is a overly simplistic version of what I am trying to do.</p>

<pre><code>var usersChoice;
var object1 = {name: 'fu',  id:'123', infoArray: [1,2,3,4,5]};
var object2 = {name: 'bar', id:'456', infoArray: [9,8]};

jQuery.extend(true, usersChoice, object1);
</code></pre>

<p>Then if I want to change my mind</p>

<pre><code>jQuery.extend(true, usersChoice, object2);
</code></pre>

<p>The result:</p>

<pre><code>usersChoice = {name: 'bar', id:'456', infoArray: [9,8,***3,4,5***]};
</code></pre>

<p>What I want is the old object to be totally replaced with the new.  Even just a deep erase function I could call just before extend like...</p>

<pre><code>userChoice.nukeItFromOrbit();
</code></pre>

<p>For the record I have tried just userChoice = new object or not copying but just pointing to the original objects.  Both solutions have an annoying tendency of going out of scope at some point along the line.  (some of these objects are being passed along as a 'this' I suspect is the culprit)</p>

<p>So how do I do this without reinventing the deep copy wheel?  Been looking all over and all I have found is reinventing the wheel or being told their is no reason I would ever have to do what I am doing. =/</p>
