Horje
add multiple subdocument mongoose Code Example
add multiple subdocument mongoose
#not duplicate value
db.getCollection('profilesservices').updateOne({_id: ObjectId("603ce3bf9323e811c86cb7c8")}, {
 $addToSet: {"jobPreferences.jobInterests": {$each: ["mobile developer", "backend developer"]} }    
})

# with duplicate value
db.getCollection('profilesservices').updateOne({_id: ObjectId("603ce3bf9323e811c86cb7c8")}, {
 $push: {"jobPreferences.jobInterests": {$each: ["mobile developer", "backend developer"]} }    
})




Shell

Related
remove git tag Code Example remove git tag Code Example
standard notes for x64 linux Code Example standard notes for x64 linux Code Example
ubuntu dual monitor mouse flicker Code Example ubuntu dual monitor mouse flicker Code Example
bash script: permission denied Code Example bash script: permission denied Code Example
printing from command line filters pipelines Code Example printing from command line filters pipelines Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
10