Hey guys, i want to write a something like this ...
# help
k
Hey guys, i want to write a something like this
Copy code
query.gt('salary.min', 5000);
but this doesnt work, i have JSONB save liked this salary: { min: 10000, max: 12000 }
n
Hello @kresimirgalic! This thread has been automatically created from your message in #843999948717555735 a few seconds ago. We have already mentioned the @User so that they can see your message and help you as soon as possible! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ``...`` menu) and select "Leave Thread" to unsubscribe from future updates. Want to change the title? Use the ``/title`` command! We have solved your problem? Click the button below to archive it.
g
https://supabase.com/docs/reference/javascript/select#querying-json-data I personally have not tried .gt, but that implies it could work, but the format is 'address->postcode'
n
kresimirgalic (2022-05-29)
s
Yes, it should be like:
Copy code
js
query.gt('salary->min', 5000);
Arrows are used to get json fields, even on pure SQL.