'MySQL: Extract all Keys from a nested JSON String
In addition to this answer is it possible to extract nested keys in a simple way? Example:
{
"a": value,
"b": {
"c": value
"d": {
"e": value
}
}
}
Expected output: ['a', 'b.c', 'b.d.e'] What I have tried:
SELECT
f.`id` AS `field_name`
FROM table t,
JSON_TABLE(
JSON_KEYS(t.`column`, '$.b'),
'$[*]' COLUMNS(
`id` VARCHAR(191) PATH '$'
)
) AS t
but that would only show me one of the nested keys and skip the outer
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
