I have an array in my model document. I would like to delete elements in that array based on a key I provide and then update MongoDB. Is this possible?
Here\'s my
keywords = [1,2,3,4]; doc.array.pull(1) //this remove one item from a array doc.array.pull(...keywords) // this remove multiple items in a array
if you want to use ... you should call 'use strict'; at the top of your js file; :)
...
'use strict';