Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

add items to a list in a document monoose

const {name , id} = req.body
    Category.update(
        {_id: id}, 
        {$push: {items: {"name": name}}},{new: true, upsert: true }).exec();
        res.sendStatus(200)
 
PREVIOUS NEXT
Tagged: #add #items #list #document #monoose
ADD COMMENT
Topic
Name
5+3 =