Created
October 11, 2018 09:23
-
-
Save andijakl/81b587ca01e3b70cea59c4742edaa79d to your computer and use it in GitHub Desktop.
Delete an item and retrieve all items from an Azure Cosmos DB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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