title: jquery: extend method with two objects - result is object Object?
body: <p>I'm doing some jQuery tutorial at jQuery.com and try to understand the extend method right now. it works ALMOST.</p>
  
  <pre><code>var object1 = {
                  apple: 0,
                  banana: {weight: 52, price: 100},
                  cherry: 97
                  };
  
              var object2 = {
                  banana: {price: 200},
                  durian: 100
                  };
  
              var obj =   $.extend(object1, object2);
  
              for(var key in obj) {
                  alert('key: ' + key + '\n' + 'value: ' + obj[key]);
  </code></pre>
  
  <p>The alert box gives the following output:</p>
  
  <ul>
  <li>key:apple  value:0 </li>
  <li>key:banana value: [object Object] </li>
  <li>key:cherry value: 97 </li>
  <li>key:durian value: 100</li>
  </ul>
  
  <p>The second key-value-pair should be banana:200. Can somebody explain why it is not? Thanks in advance.</p>