MongoDB has an $exists operator to check if a key exists in the document or not. It works with true and false.
Postgres can also have JSON data stored. What is the Postgres equivalent for the following Mongodb Query?
db.myDocs.find_one({'myKey': { '$exists': False }})
If you want to check a top level field you can add a
whereclause:And if you want to check a subfield of a json field you can use the jsonb
?operator: