Replies: 1 comment 5 replies
-
Can you explain in which cases you want to search an entire JSON? So you want to search the JSON as a string, not an object/array? And in which cases you need to use |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Depending on the driver and situation,
json_extract()
or::text
/->>
needs to be used to search JSON columns.Sometimes, I want to search the entire JSON (
json_extract(column, '$')
/column::text
), and sometimes I just want to search inside a specific key (json_extract(column, "$.json_key")
/column->>'json_key'
). I think that one expression could be abstracted to handle all of these cases.Searches should also work with case insensitivity, as per #5.
Beta Was this translation helpful? Give feedback.
All reactions