RawSushi's Tech Journal
My online tech scrapbook where I keep my notes in case I need to look them up later
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
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment