weixin_33682719 2020-04-03 04:28
浏览 215

json_extract sql迭代吗?

sorry I'm a beginner in coding. I have a set of json array consisting of more than 100 variables. here's the example of the few data:

{"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"}

How can I iterate through, let's say: only from "noreg" variable through "alamat" variable, with looping? From far what I'm doing is this:

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

I'm tired in doing all the JSON_EXTRACT for = the amount of the data I need. Let's say 50. Then, I have to repeat that 50 times. Any solution will be so helpful.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 求差集那个函数有问题,有无佬可以解决
    • ¥15 【提问】基于Invest的水源涵养
    • ¥20 微信网友居然可以通过vx号找到我绑的手机号
    • ¥15 寻一个支付宝扫码远程授权登录的软件助手app
    • ¥15 解riccati方程组
    • ¥15 display:none;样式在嵌套结构中的已设置了display样式的元素上不起作用?
    • ¥15 使用rabbitMQ 消息队列作为url源进行多线程爬取时,总有几个url没有处理的问题。
    • ¥15 Ubuntu在安装序列比对软件STAR时出现报错如何解决
    • ¥50 树莓派安卓APK系统签名
    • ¥65 汇编语言除法溢出问题