Answers for "how to spread an array in mongodb"

0

how to spread an array in mongodb

db.inventory.update(
   { _id: 2 },
   { $addToSet: { tags: { $each: [ "camera", "electronics", "accessories" ] } } }
 )
Posted by: Guest on October-08-2020

Code answers related to "how to spread an array in mongodb"

Browse Popular Code Answers by Language