title: problem in getting value of object in Javascript
body: <p>I am trying to convert collection data into csv, so i am using 'csv-stringify' npm</p>
  
  <p>my code for converting into csv in </p>
  
  <pre><code>      ...auditlogs.reduce((rows, data) =&gt; {
          const newRows = []
          const newRow = {}
          console.log('data: ', data);
          console.log('data._id: ', data._id);
          console.log('data.actor: ', data.actor);
          newRow[(null, 'Actor')] = data.actor;
          newRow[(null, 'Date')] = data.date;
          newRow[(null, 'Action')] = data.action;
          newRow[(null, 'Data')] = data.object;
          newRow[(null, 'Description')] = data.description;
          newRows.push(Object.assign({}, rowProto, newRow)) 
          const newRowsNoHeaders = newRows.map(row =&gt; Object.values(row))
          return [...rows, ...newRowsNoHeaders]
        }
  </code></pre>
  
  <p>result of console.log('data: ', data)  is</p>
  
  <pre><code>data =  { _id: 5ae01fa9dc9e47001a92abd4,
            actor: 'Toan',
            date: 2018-04-25T06:26:49.057Z,
            origin: '',
            action: 'Add',
            label: '',
            object:
             '{ _id: 5ae01fa9dc9e47001a92abd3,\n  name: \'Welcome\', __v: 0 }',
            description: '',
            __v: 0 }
  </code></pre>
  
  <p>But when I am trying to get the value it is showing undefined.</p>
  
  <blockquote>
    <p>data.actor = undefined</p>
  </blockquote>
  
  <p>but only <code>data._id</code> is giving correct value.</p>
  
  <p>This is a screenshot
  <a href="https://i.stack.imgur.com/1AIfw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1AIfw.png" alt="enter image description here"></a></p>
  
  <p>Can some tells me a solution?</p>