Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

mongoose update array push multiple

Kitten.update(
  { name: 'fluffy'},
  {
    $push: {
      values: {
        $each: [2, 3]
      }
    }
  }
)
  .then(result => {
  	console.log(result)
  })
  .catch(err => {
    console.error(err)
  })
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #mongoose #update #array #push #multiple
ADD COMMENT
Topic
Name
1+1 =