Apologies, lots of similar questions have been answered, but I still can’t resolve my issue from those. I have two collections shapes and geometry. I have successfully queried shapes to remove all red shapes
myquery = {"Colour": "Red"}
x = collection.delete_many(myquery)
But I want to use the result of this query on the geometry collection that shares the common field “Name”, so that I delete any document from geometry that has a Name that was found in the original query (red shapes)
example from shapes
_id: "123"
Colour: "red"
Shape: "square"
Name: "xyz123"
Line: "bold"
example from geometry
_id: "456"
Height: "6"
Width: "6"
Name: "xyz123"
Area: "36"
Many thanks