I can select records that match a certain json value like where properties->>'foo' = 'bar', but what if the key 'foo' has not yet been set? I've tried where properties->>'foo' IS NULL but I get an error
No operator matches the given name and argument type(s). You might need to add explicit type casts.
: SELECT "merchants".* FROM "merchants" WHERE (properties->>'foo' IS NULL)