Answers for "add items to a list in a document monoose"

3

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)
Posted by: Guest on August-07-2020

Code answers related to "add items to a list in a document monoose"

Code answers related to "Javascript"

Browse Popular Code Answers by Language