I would like to filter a JSONField my_field
where the JSon is not empty. In the documentation there are has_key
and has_any_key
methods but I don't know the possible keys in advance. In SQL it should be something like:
select * from my_model where cardinality(my_field)>0;