In Node and Mongoose, I'd like to remove an object from an array in a document. The structure is like this.
{
_id: ObjectId,
title: String,
tags: [
{ text: String },
{ text: String }
]
}
I will look up an item by it's _id
, but then I want to look within the tags for a certain String
and remove that from the array.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.