mongodb aggregate if array empty code example
Example: mongodb query to check empty array
collection.find({ arrayElementName: { $exists: true, $not: {$size: 0} } })
collection.find({ arrayElementName: { $exists: true, $not: {$size: 0} } })