Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

array count 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 stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #array #count #mongoose #query
ADD COMMENT
Topic
Name
9+3 =