0

对不起,我是编码的初学者。我有一组包含 100 多个变量的 json 数组。这是少数数据的示例:

{"noreg":"643758","norm":"655","nama":"cindy minato ishii","normunit":"vm7546","tglreg":"02-04-2020","alamat":"yujeyuo prefecture, thaikhan st. 467, tokyo, japan","tgllahir":"30-04-1964","umur":"56","gender":"P","agama":"shinto","tglcu":"10-04-2020","pekerjaan":"vampire","paket":"GOLD"}

我怎样才能遍历,比如说:只有从“noreg”变量到“alamat”变量,循环?从远处看,我正在做的是:

SELECT JSON_EXTRACT(xxx, '$.nama') AS nama,
                        .....
                        .....
                        .....
            JSON_EXTRACT(mcu_data, '$.alamat') AS alamat
FROM xxx
WHERE xxx

我厌倦了为 = 我需要的数据量做所有的 JSON_EXTRACT。假设是 50。然后,我必须重复 50 次。任何解决方案都会很有帮助。

4

0 回答 0