私は次の配列jsonを持っています、どうすればそれを読むことができますか?すでに試してみましたが、動作しますdocument.write(arr)
が、入れてみると、document.write(arr[0].Category)
undefined
var arr = [{"Category":
{"cell":{"question1":{"que1":"What is the cell?"},
"option1":{"op1":"The cell is the basic structural and functional unit",
"op2":"is a fictional supervillain in Dragon Ball"},"answer1":"opt1"}}},
{"Category":{"Mars":{"question1":{"que1":"How many moons does Mars?"},
"option1":{"op1":"5","op2":"2"},"answer1":"opt2"}}}]
ちなみに、配列は整形式です。そうするとdocument.write(arr)
同じ配列が返されるからです。