Express MongoDB Filter

JSON →
library 1.1.2 ·javascript maintenance
verified Jun 5, 2026

ExpressJS middleware that allows handling custom MongoDB queries sent from the client via HTTP query parameters. Current stable version is 1.1.2, last updated in 2020. The middleware parses a JSON string from a query parameter (default: 'filter') and attaches it to req.query, enabling direct MongoDB query syntax in HTTP requests. No built-in security filtering – explicit documentation warns that input must be sanitized manually, a critical footgun. Supports common MongoDB operators ($or, $and, $ne, $regex, etc.) and allows custom configuration for parameter name, error class, and operator whitelist/blacklist. Lightweight, no dependencies. Differentiator: minimalistic approach vs. more opinionated query-parsing alternatives like 'express-query-filter'.