Instantly share code, notes, and snippets.

Embed
What would you like to do?
Delete an item and retrieve all items from an Azure Cosmos DB
// Delete item
const deleteResponse = await container.item(newItemId).delete();
console.log(deleteResponse.item.id);
// Read all items from the container
const docResponse = await container.items.readAll().toArray();
res.send(docResponse);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment