gpt4 book ai didi

mysql - mysql 字段中 json 的正则表达式

转载 作者:行者123 更新时间:2023-11-29 14:02:12 25 4
gpt4 key购买 nike

我有一个包含如下 JSON 数据的调查字段:

{
"reason":
{
"0":"first",
"1":"second",
"other":["on","third"]
},
"comment":"fourth"
}

我想在 SQL 中选择第一个、第二个、第三个和第四个值。

谢谢。

最佳答案

var JSONObject = {"reason":{"0":"first","1":"second","other":["on","third"]},"comment":"fourth"};

document.getElementById("first").innerHTML=JSONObject.reason[0];

document.getElementById("second").innerHTML= JSONObject.reason[1];

document.getElementById("comment").innerHTML= JSONObject.comment[0];

关于mysql - mysql 字段中 json 的正则表达式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14892711/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com