How to use slice function in mongojack

27 views
Skip to first unread message

A. Jain

unread,
May 27, 2015, 8:53:19 AM5/27/15
to mongo-jack...@googlegroups.com
I have a use case in which i need the latest 2 sub-documents within a document. Had I be doing this through mongodb shell I would have done the following
db.primary.find( { _id: 5 }, { ratings: { $slice: 2 } } )

how do I implement the same using mongojack?
Reply all
Reply to author
Forward
0 new messages