I have this query:
[
{
'$match': {
'imageUrls': {
'$type': 'array',
'$ne': []
}
}
}, {
'$project': {
'imageUrls': 1,
'time': 1
}
}, {
'$sort': {
'time': 1
}
}, {
'$skip': 0
}, {
'$limit': 10
}
]
This is the schema:
{
"_id": {
"$oid": "5ffb0c14dd482daa039ee906"
},
"imageUrls": ["image url1", "image url2"],
"time": 342432432432
}
The output is a list of documents, each containing the array field imageUrls.
I want to have all the values in the imageUrls fields in one single array field.