Skip to content

JSON query with key name restrictions, or quoting keys? #610

Answered by steve-chavez
mstade asked this question in Questions
Discussion options

You must be logged in to vote

Hey @mstade,

Querying such a column does work through postgrest, but you have to double quote the key:

GET /entities?select=jsonb_col->"a:b:c:d:something"->>id&jsonb_col->"a:b:c:d:something"->>id=eq.3

[{"id":"3"}]

Have you tried to use double quotes(or urlencoded them as %22) inside the supabase-js call? If that doesn't work then it's probably a bug in postgrest-js.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@mstade
Comment options

@steve-chavez
Comment options

@mstade
Comment options

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