Hi! I have a column which is a json field and I ne...
# exposed
s
Hi! I have a column which is a json field and I need to filter records based on fields in the json (rather than the json itself). Does Exposed provide an operator for this?
e
@Chantal Loncle, could you please check?
🙏 1
c
Hi @Smorg, Exposed currently supports 3 functions for this, depending on how you need to use the json fields as a filter:
extract()
,
contains()
, and
exists()
. They are called on the json column and, depending on your underlying database, also allow you to provide a json path/key that matches the specific fields to search when filtering. Here are some examples of their use. In the event that none of them are the operator you're looking for, please consider opening an issue on YouTrack with the database you're using and the name of the specific operator/function you'd like to see supported.
s
extract
works. thanks, guys!
👍 1