jquery.extend(true, [], obj) not creating a deep copy
<p><a href="http://jsfiddle.net/s2bLv/7/" rel="nofollow">jsFiddle here</a>.</p>

<p>If deep copying worked, the output would be "Curious George" and not "Ender's Game". How can I make a deep copy? An answer to <a href="http://stackoverflow.com/questions/122102/most-efficient-way-to-clone-an-object">this question</a> indicates that <code>$.extend(true, [], obj)</code> creates a deep copy. Yet my example shows that it doesn't.</p>

<pre><code>function Person(){}
Person.prototype.favorite_books = [];

var george = new Person();
george.favorite_books = ["Curious George"];

var kate = new Person();
kate.favorite_books = ["The Da Vinci Code", "Harry Potter"];

var people = [kate, george];

var people_copy = $.extend(true, [], people);
people_copy[0].favorite_books[0] = "Ender's Game";

$('#text').text(people[0].favorite_books[0]);
</code></pre>

<p><strong>SOLUTION</strong></p>

<p>I updated the jsFiddle. It turns out I need to deep copy each object in the array individually <strong>if the object is a custom object</strong> (that is, <code>$.isPlainObject</code> returns false).</p>
