Question:I have a Python code to manage a collection in Cosmos DB by utilizing CosmosClient. It provides upsert_item, query_item, create_item, etc. But I need to delete properties from an existing item. Because the item could contain lots of properties, I wonder if there any better approach other than updating the whole item. I tried following code:
Answer:To delete an item from a dictionary in Python, you will need to use
del. So your code would be something like:
If you have better answer, please add a comment about this, thank you!