How to make values inside of array empty

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

This should do it

Todos.update(todo._id, {$set: {todoIds: []}});
1 Like

It worked! Thank you very much!