Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

array.length in mongoose query

 { “countries.1” : { “$exists” : true } }

//will do what you want. If you want $gt : 3, you would use countries.3 as array indexes starts at 0.
Source by www.mongodb.com #
 
PREVIOUS NEXT
Tagged: #mongoose #query
ADD COMMENT
Topic
Name
9+6 =