I need to convert the following sql statement to the django equivalent but I can’t find a way to use the cast function in the filter.
SELECT x, y
FROM my_model
WHERE z::text LIKE ‘%w%’;
The z field is of type jsonb and the database is postgressql.
I want to be able to search the json type column for any text, regardless of whether it is a key or a value, I do not know the names of the keys in advance.