Hello everybody I have a document is structured like that:
{
name : abc
message:
[{
id: 4,
status : 0,
content : "abc"
},
{
id: 2,
status : 1,
content : "abc"
},
{
id: 1,
status : 1,
content : "abc"
}
]
}
How Can I get the sorted message array by id key and status = 1 I mean
{
id: 1,
status : 1,
content : "abc"
},
{
id: 2,
status : 1,
content : "abc"
},
Thank so much!