Singh
0
Q:

$pull mongoose

TemplateDoc.findOneAndUpdate(
    { userId: _id },
    { $pull: { templates: { _id: templateid } } },
    { new: true }
  )
    .then(templates => console.log(templates))
    .catch(err => console.log(err));
4

New to Communities?

Join the community