Skip to content

Instantly share code, notes, and snippets.

@andijakl
Created October 11, 2018 09:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andijakl/81b587ca01e3b70cea59c4742edaa79d to your computer and use it in GitHub Desktop.
Save andijakl/81b587ca01e3b70cea59c4742edaa79d to your computer and use it in GitHub Desktop.
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