For the whole column, items_purchased use

CREATE INDEX idx_purchases ON public.purchases
(items_purchased)

For a specific Key (price here) in the field use,

CREATE INDEX idx_purchases_price
ON public.purchases
((items_purchased ->> ‘price’))

Hope this helps

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store