Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

mongodb find and update array item by id

db.myCollection.update({"_id" : 1, "lb.id" : 2},{$set : {"lb.$.sc" : 17}})
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #mongodb #find #update #array #item #id
ADD COMMENT
Topic
Name
6+2 =