Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

mongodb push to index

await Model.findByIdAndUpdate(id, {
   $push: {
   	 '<array-name>': {   
         $each: [],
         $position: 0
     }
   }
})
 
PREVIOUS NEXT
Tagged: #mongodb #push #index
ADD COMMENT
Topic
Name
4+8 =