Skip to content
Advertisement

Parse text of json object key value postgresql

I have the following kind of objects maintained in a table column. I have tried parsing this object to get the value for this key “1075852262” which has this value “Event="13" Description="(EMOVIES r8)"..........

The SQL I have written is:

The result it gives is like this:

Now, I want to fetch only Description value out of it i.e. (EMOVIES r8). How can I do this?

Advertisement

Answer

The substring method using regular expressions is probably what you’re looking for. I solved your case using the following

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement