As per discussion , with Toine Siebelink Contains Xpath is case sensitive , So ilike keyword would be suitable to implement the contains query which support case sensitive attribute values
3
cpsdb=# SELECT * FROM FRAGMENT WHERE anchor_id = 4 and attributes->>'lang' like 'en';
Expand
{ "lang": "en", "price": 699, "title": "The Golden Compass", "authors": [ "Philip Pullman" ], "pub_year":1995 }