Delete One
AI-generatedSummary
Delete a single document from a specified MongoDB collection that matches the provided query.
Inputs
- Database (required) — The name of the MongoDB database containing the target collection.
- Collection (required) — The name of the MongoDB collection from which to delete the document.
- Query (required) — A set of fields defining the filter criteria to identify the document to delete.
Output shape
a JSON array containing a single object with a 'deleted' property indicating the number of documents deleted (0 or 1).
Only deletes one document matching the query filter. If no document matches, 'deleted' will be 0. Supports multiple executions for multiple input items.
Examples
Example 1: Delete a user document by specifying the user's email in the query fields.
Set Database and Collection to target the users collection, and set Query fields with Key as 'email' and the appropriate email string Value.