Answer the question
In order to leave comments, you need to log in
How to sort an array of objects by date in MongoDB?
I have a collection with the following schema:
var project = new Schema({
head:{
head_task: String,
userID: String
},
access_users: {
type : Array ,
"default" : []},
context_task: [{
from_name: String,
status: Boolean,
task: String,
created_task: {
type: Date,
default: Date.now()
}
}],
created: {
type: Date,
default: Date.now
}});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question