title: Node.js - console.log does not show items in array but instead shows [Object]
body: <p>I have a problem with logging out the contents of an array inside an object. The actual object looks like this </p>
  
  <pre><code>   var stuff = { accepted: [ 'item1', 'item2' ],
           rejected: [],
           response: 'Foo',
           envelope: { from: 'The sender', to: ['new item1', 'new item2'] },
           messageId: 'xxxxxxxxxxxxx' } }
  </code></pre>
  
  <p>The <code>console.log</code> shows the items of the first array fine but the second array is being output as <code>[Object]</code>.</p>
  
  <pre><code> { accepted: [ 'item1', 'item2' ],
               rejected: [],
               response: 'Foo',
               envelope: { from: 'The sender', to: [Object] },
               messageId: 'xxxxxxxxxxxxx' } } 
  </code></pre>
  
  <p>What is happening here and how can I get the items of the second array to show when I <code>console.log</code>. Thanks for any help!</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Sorry, I forgot to add that I am working exclusively in Node.js so it's a server side log that needs to display the object exactly as it's received from a callback with a straight <code>console.log</code>, ie. no further stringify-ing. </p>
  
  <p>I also just tried creating another random object with a similar structure like this.</p>
  
  <pre><code> var objText = {
        fun: {
          stuff: 'Some stuff',
          list: ['this', 'it', 'takes']
        }
      };
  </code></pre>
  
  <p>The <code>console.log</code> for the above is:</p>
  
  <pre><code>{ fun: { stuff: 'Some stuff', list: [ 'this', 'it', 'takes' ] } }
  </code></pre>
  
  <p>This appears to be the same structure to me and yet the <code>console.log</code> works fine so it seems to be perfectly possible in Node to log arrays content even when it's embedded inside and an object inside an outer object.</p>