Skip to content
Advertisement

Split text and digits by delimiter using regexp splitpart

From the table below

I would like to split the config_json column into 2 columns as below

The regex part of the code currently looks like this:

However, there are some remains such as below:

Thus, the formula above still needs to split by not just true,false or null, but also by digits or string. How can I fix that part of the code?

Advertisement

Answer

You can use json_each():

Here is a db<>fiddle.

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