I want to extract only val2 from the below column1 of a table, I'm not sure how to do it with SQL though I've tried with regexp_subtr/instr, the length of column values are dynamic but the contents of val2 is the one that's to be extracted
Input:
| column1 |
|---|
| [{'val1': '54', 'val2': 'luis long, F (Peter)', 'val3': '[email protected]', 'val4': 'xxxxyyy://somevalue', 'val5': 'Category', 'val6': 'some other value'}] |
Output:
| column 1 | column 2 |
|---|---|
| [{'val1': '54', 'val2': 'luis long, F (Peter)', 'val3': '[email protected]', 'val4': 'xxxxyyy://somevalue', 'val5': 'Category', 'val6': 'some other value'}]luis long, F (Peter) | luis long, F (Peter) |