I have this document:
{
"artifact": {
"id": 1,
"tags" : [
"art",
"art2"
],
"origins": [
{
"id": 2,
"tags" : [
"o1",
"o11"
],
"origins": [
{
"id": 3,
"tags" : [
"o2",
"o3"
]
}
]
}
]
},
"insertionDate": "15022023095425"
}
I need to write a query to check if an id matches the id of the deepest origins object of another document.
At first, I thought something like this would work:
common_elements = db.collection("tasks").where("artifact.origins.origins.id", "==", current_item_id)
Is it possible to query object properties in a nested list with Firestore?
If this is not possible, how should I remodel my data? Could I store origins objects in another collection and reference them in this document?