Say I have a JSONB object like this:
{"First":"Joe", "Last":"Smith", "Age": "29", "cat":"meow"}
I want to be able to find this JSONB object if I search just:
{"First":"Joe", "Age":"29"}
I tried this with a single attribute and it worked:
SELECT * FROM mytable WHERE name @> lower('{"First": "Joe"}')::jsonb
I tried this with two attributes and it did not work:
SELECT * FROM mytable WHERE name @> lower('{"First": "Joe", "Last":"Smith"}')::jsonb
What am I missing? I figured based on the documentation this should work