How to empty fields in mongodb except last ones

Good.

Yes, you were right. The output of find()…toArray() was an array of object and you needed an array of ObjectId(). Nice job!

1 Like