mongodb get array returning empty code example
Example 1: mongodb empty an array field
db.collection.update({}, { $set : {'myArray': [] }} , {multi:true} )
Example 2: mongodb query to check empty array
collection.find({ arrayElementName: { $exists: true, $not: {$size: 0} } })