I have a JSON column that is 2 levels deep and has an array of objects at the deepest level. I want to look this up in Django. How can I do it using Django syntax? data
is the json column inside my table1.
SELECT *
FROM table1, jsonb_array_elements(data->'comm') comm
where comm->>'f' in ('hello', 'hero', 'heyo')
Data Structure: data = {comm: [{f: 'hello'}, {f: 'hero'}]}