Index not being used on array elements in JSONB column
The left hand side of the WHERE expression must match the expression in the index, in order for the index to be usable (because the index stores a copy of that expression's value).
As your index is created on the expression data -&gt; 'permissions' you need to use that in the query:
select *
from testuser
where data -&gt; 'permissions' @&gt; '[{&quot;type&quot;:&quot;ARTICLE&quot;}]';

Note that this doesn't guarantee that the index is used. If the condition returns a substantial part of the table, the Seq Scan is still faster.

For the condition data @&gt; '{&quot;permissions&quot;: [{&quot;type&quot;: &quot;ARTICLE&quot;}]}' you would need to create an index on data (not an expression)