Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

mongoose project first element from array

db.my_collection.find({},{"my_field":{$slice:1}})
 
PREVIOUS NEXT
Tagged: #mongoose #project #element #array
ADD COMMENT
Topic
Name
1+4 =