How to remove array element in mongodb?

后端 未结 6 1517
情深已故
情深已故 2020-11-22 07:10

Here is array structure

contact: {
    phone: [
        {
            number: \"+1786543589455\",
            place: \"New Jersey\",
            createdAt: \         


        
6条回答
  •  无人共我
    2020-11-22 07:37

    If you use the Mongoose API and looking to pull a sub/child object: Read this document Don't forget to use save() when you're done editing otherwise the changes won't be saved to the database.

提交回复
热议问题