我有一个包含 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];