我的mongodb响应中添加了不需要的对象

时间:2018-11-13 09:44:05

标签: javascript node.js mongodb

[{ '$__':
     InternalCache {
       strictMode: true,
       selected: {},
       shardval: undefined,
       saveError: undefined,
       validationError: undefined,
       adhocPaths: undefined,
       removing: undefined,
       inserting: undefined,
       version: undefined,
       getters: {},
       _id: 5bdff2078562732cf4820ba8,
       populate: undefined,
       populated: undefined,
       wasPopulated: false,
       scope: undefined,
       activePaths: [Object],
       pathsToScopes: {},
       session: undefined,
       ownerDocument: undefined,
       fullPath: undefined,
       emitter: [Object],
       '$options': [Object] },
    isNew: false,
    errors: undefined,
    _doc:
     { flag: [],
       user: [],
       createdate: 2018-11-05T07:32:23.825Z,
       __v: 0 },
    '$init': true,
    parent_username: '',
    flag: [] } ]

我有一个像这样的数据集:

         { flag: [],
           user: [],
           createdate: 2018-11-05T07:32:23.825Z,
           __v: 0 }

现在我在数据集上添加一些键

{
 flag: [],
 user: [],
 createdate: 2018-11-05T07:32:23.825Z,
 parent_username: '',
 flag: []
 __v: 0
}

但是我得到了额外的回应。任何想法为什么会这样。这可能是mongodb或节点或javascript问题。 任何建议都非常感谢。

0 个答案:

没有答案