-
Hi! I have a simple query on table where a column imaginatively name select data from userinfo where data ->> 'personalNumber' = '12345' This works fine in the query editor in supabase. However, when using the JS client I can't seem to figure out how the equivalent query. Running this yields an error: var { data, error } = await supabase
.from('userinfo')
.select('data')
.eq(`data ->> 'personalNumber'`, person.user.personalNumber) The error is: {
hint: 'Perhaps you meant to reference the column "userinfo.data".',
details: null,
code: '42703',
message: 'column userinfo.data does not exist'
} How would you write this query using the supabase client? |
Beta Was this translation helpful? Give feedback.
Answered by
inian
Jan 24, 2021
Replies: 1 comment 1 reply
-
Can you try with |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
mstade
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can you try with
data->personalNumber
? Here are the docs for querying JSON with the JS client - https://supabase.io/docs/client/select#quering-json-data