I have this json file
{
"data": {
"Header": {
"num": 1000095371,
"name": "1000095371 LE"
},
"character": {
"b1234": {
"ID": 1
},
"b1256": {
"ID": 2
},
"b12389": {
"ID": 3
}
}
},
"id": 123456,
}
I want to extract like this
+--------+------------+---------------+--------------+-------------+
| id | num | name | characterkey | characterid |
+--------+------------+---------------+--------------+-------------+
| 123456 | 1000095371 | 1000095371 LE | b1234 | 1 |
+--------+------------+---------------+--------------+-------------+
| 123456 | 1000095371 | 1000095371 LE | b1256 | 2 |
+--------+------------+---------------+--------------+-------------+
| 123456 | 1000095371 | 1000095371 LE | b12389 | 3 |
+--------+------------+---------------+--------------+-------------+
so the nested values inside character will be dynamic like it may have dynamic characterkey and count as well. I am able to extract all except this characterkey
Can someone provide me the query for expected output ? I am using mariadb 10.6.12