Skip to content

How to use the _contains JSONB operator? #6375

Answered by praveenweb
corysimmons asked this question in General
Discussion options

You must be logged in to vote

@corysimmons - The _contains object can be written as

{_contains: {owner: "bob"}}

In your example, the escaping of the object is the issue. If you click on Analyze to see the generated SQL, you would notice that Hasura already escapes the given expression for _contains operator and your usage makes it redundant and hence empty results.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@corysimmons
Comment options

@corysimmons
Comment options

Answer selected by rikinsk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
General
Labels
None yet
2 participants