I am trying to remove an item from a collection that is stored in a mongoose document. My document looks like this:
{ \"__v\": 3, \"_id\": \"5221040475f
Subdocuments now have a remove function. Use as follows from the spec:
var doc = parent.children.id(id).remove(); parent.save(function (err) { if (err) return handleError(err); console.log('the sub-doc was removed') });