我尝试使用JavaScript解析JSON,但我无法弄清楚如何迭代此结构,因为我无法确定这是一个数组,一个对象还是一个对象包含一个数组。这是代码:
{
"noun":
{
"syn":
["trial","trial run","tryout","mental test","mental testing","psychometric
test","examination","exam","run","attempt","communicating","communication","cover","covering","effort","endeavor","endeavour","experiment","experimentation","mental measurement","natural covering","try"]
},
"verb":
{
"syn":["prove","try","try out","examine","essay","screen","quiz","ascertain","be","check","determine","evaluate","find out","judge","learn","pass judgment","score","see","submit","take","undergo","watch"]
}
}
答案 0 :(得分:4)
{}
表示JSON块是OBJECT。它有两个属性:noun
和verb
。每个属性都有一个名为syn
的属性,它是一个数组(由[]
表示)。