MySQL method to extract all keys in nested JSON string
<p>In addition to this answer, is it possible to extract nested keys in a simple way?
Example: </p>
<pre class="brush:php;toolbar:false;">{
"a": value,
"b": {
"c": value,
"d": {
"e": value
}
}
}</pre>
<p>Desired output: ['a', 'b.c', 'b.d.e']
What I've tried: </p>
<pre class="brush:php;toolbar:false;">SELECT
f.`id` AS `field_name`
FROM table t,
JSON_TABLE(
JSON_KEYS(t.`column`, '$.b'),
'$[*]' COLUMNS(
`id` VARCHAR(191) PATH '$'
)
) AS t</pre>
<p>But this will only show one of the nested keys and skip the outer keys. </p>