Here if you pass username as {"$gt": ""} and password as {"$gt": ""}, You can bypass the security.
It’s simple if the server accepts json payload. It’s possible even if it only accepts url encoded key - value pairs.
You just need to change your request to send username[$gt]=&password[$gt]= which will translate to following:
The solution to this exploit is quite simple. Like parameterized query in SQL, we just need to set the query selector explicitly.