0

次のような JSON データを含む調査フィールドがあります。

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

SQL で 1 番目、2 番目、3 番目、4 番目の値を選択したい。

ありがとうございました。

4

1 に答える 1

1
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];
于 2013-02-15T10:36:24.867 に答える