Hello team, I’m trying to query JSON data. I have ...
# troubleshooting
g
Hello team, I’m trying to query JSON data. I have a field called
category
with a JsonArray, for example:
["category1", "category2", "category3"]
and I need to get all rows where
category
contains
category2
I was looking at https://docs.pinot.apache.org/users/user-guide-query/json-queries but I don’t see any way for searching inside a JsonArray. Any idea how it could be done?
k
you can write the query assuming category is single value
we do a bunch of things internally to handle arrays
g
Do you mean like this?
Copy code
select category from table where category = 'category2'
I tried but I don’t get any results
k
You still need to use JSON Match