empty array in mongodb node js code example Example: mongodb empty an array field db.collection.update({}, { $set : {'myArray': [] }} , {multi:true} )