I need some help on a MySQL REGEX_REPLACE pattern. I want to get the first value on a json string:
[{"lbl":"mobile","val":"987 654 321"},
{"lbl":"home","val":"123 456 789"}]
SELECT REGEX_REPLACE(`phones`, PATTERN, '') FROM table;
So, what I would like to get is 987 654 321, What pattern would do the job?
valhad its own column, then you would simply beSELECT val FROM table;There are times to useJSON; I don't think this is one of them.