Monday, August 29, 2016

MongoDB: Query for Documents Based On Array Size


db.collectionName.count({"arrayName":{$exists:true},$where:'this.arrayName.length>3'})

Reference: http://stackoverflow.com/questions/7811163/query-for-documents-where-array-size-is-greater-than-1

No comments:

Post a Comment