Does Array contains operation work for with nested arrays?

Dear Django community!

Lets say I have a model instance having an array-field which looks like this: array = [ [A, B], [C, D, E] ]
Now I want to query like this: .filter(array__contains = [ [A], [C,E] ]) and the instance holding the array above should be found. (contains applied to each element of the array individually)
Does contains on arrays work nested like this? Or can I achieve this behavior in Django any how or do I need custom queries (going back to postgresql native code?)

I would love to hear your thoughts on this!
Thank you.

I don’t think this is possible in Django by default. I would look for how to write the SQL for this first, then work backwards. I suspect there’s some built-in DB level function that would support it that you could then utilize in Django.