title: mongoose object doesh't work like local object
body: <p>I'm using below function for building a tree list and is okey with local <code>obj_list</code> object, Why That not work with mongodb <code>doc</code> object?</p>
  
  <p><strong>Code:</strong></p>
  
  <pre><code>const promise = Tree.find({uid: mongoose.Types.ObjectId('5c17974259bf01254c9c7f56')}, {'_id': false, 'uid': false}).exec();
  promise.then(async (doc) =&gt; {
  
    const obj_list = doc; // not work with doc object in db
    const obj_list = [{    // work localy
      nid: 1,
      name: 'father',
      parent: '0',
      __v: 0,
    },
    {
      nid: 2,
      name: 'boy',
      parent: '1',
      __v: 0,
    }];
    console.log(doc);
    console.log(obj_list);
  
    const obj_nested_list = [];
    let obj;
  
    function fill_with_children(children_arr, parent_id) {
      for (let i = 0; i &lt; obj_list.length; i++) {
        obj = obj_list[i];
  
        if (obj.parent == parent_id) {
          children_arr.push(obj);
          obj.children = [];
          fill_with_children(obj.children, obj.nid);
        }
      }
    }
  
    fill_with_children(obj_nested_list, 0);
  
    console.log(obj_nested_list);
  }).catch((err) =&gt; {
    if (err) {
      console.log(err);
    }
  });
  </code></pre>
  
  <p><strong>console.log(doc):</strong></p>
  
  <pre><code>[ { nid: 1, name: 'father', parent: '0', __v: 0 },
    { nid: 2, name: 'boy', parent: '1', __v: 0 } ]
  </code></pre>
  
  <p><strong>console.log(obj_list):</strong></p>
  
  <pre><code>[ { nid: 1, name: 'father', parent: '0', __v: 0 },
    { nid: 2, name: 'boy', parent: '1', __v: 0 } ]
  </code></pre>
  
  <p><strong>output with doc:</strong> // not ok</p>
  
  <pre><code>[ { nid: 1, name: 'father', parent: '0', __v: 0 } ]
  </code></pre>
  
  <p><strong>output with obj_list:</strong> // ok</p>
  
  <pre><code>[ { nid: 1,
      name: 'father',
      parent: '0',
      __v: 0,
      children: [ [Object] ] } ]
  </code></pre>