Suppose I have a collection with an array field:
{
title: String,
users: [String],
}
Now I need to query a list of documents from the collection, using only the length of users in each of it, without actual elements in users array (because it maybe large, it won't be worth to fetch them from db and count the length):
Collection.find({}).sort({ _id: -1 })
Is it possible?
usersarray?