I have collection named Todos
and one of the documents looks like this.
{
_id:123566,
title:"todo1",
todoIds:["asdaddda", "eudhaoda", "aosdads"],
completed:false
}
I like to empty todoIds
and how can I do it?
attempts
1,
Todos.update.(todo._id, {$pull: {todoIds: {$in: []}}});
2,
Todos.update(todo._id, {$unset: {todoIds: []}});
None of this didn’t remove values in array