【发布时间】:2021-12-18 21:39:30
【问题描述】:
我有一个对象数组 - 列表[];和一个对象 - obj;
这是列表数组:
{
_id: new ObjectId("61840c5ce237f22a1c7a1ac7"),
name: 'list1',
content: [ 'aaaa' ],
description: 'aa',
tags: [],
lastmodified: 1,
__v: 0
},{
_id: new ObjectId("61840def80a88d1b2ffce400"),
name: 'list',
content: [ 'list!' ],
description: 'test',
tags: [],
__v: 0
}
这是 obj 对象:
{
_id: new ObjectId("61840def80a88d1b2ffce400"),
name: 'list',
content: [ 'list!' ],
description: 'test',
tags: [],
__v: 0
}
简单问题:如何从“列表”中删除对象,类似于“obj”之一
【问题讨论】:
标签: node.js arrays mongodb mongoose