Hello, so I stumbled on this issue. I have this kind of document:
{
"day": 1,
"title": "Lorem ipsum dolor sit amet",
"data": [
{
"type": "body",
"content": "Lorem ipsum dolor sit amet"
},
{
"type": "content_list",
"content": [
{
"id": "6312b5bd0fb68141c6bdc4d0",
},
{
"id": "6311c6c50fb68141c6b97710",
},
]
},
{
"type": "body",
"content": "Lorem ipsum dolor sit amet"
},
{
"type": "content_list",
"content": [
{
"id": "6312b5bd0fb68141c6bdc4d0",
},
{
"id": "6311c6c50fb68141c6b97710",
},
]
},
There is a list of different content types in data, if the content type is “content_list” then I would like to do a $lookup using the id on another collection.
Is it possible to do a conditional $lookup ?