I have the below column product_details where I want to extract the code where the colour is green.
Column - product_details
"[
{\"colour\":\"red\",\"code\":1,\"id\":111\"},{\"colour\":\"blue\",\"code\":4,\"id\":222\"},{\"colour\":\"green\",\"code\":6,\"id\":333\"}
]"
o/p: 6
I tried regex_replace
and regex_extract
to get the value. But not successful.