我有一个这种形式的json:
var test = { "name1" : [ "aaa", "bbb"], "name2" : [ "ccc", "ddd" ] };
我试图像这样迭代
for (var names in test )
{
for ( var element in names )
{
// problem we got the chars in the "names1", etc
}
}
我到底错过了什么?
我有一个这种形式的json:
var test = { "name1" : [ "aaa", "bbb"], "name2" : [ "ccc", "ddd" ] };
我试图像这样迭代
for (var names in test )
{
for ( var element in names )
{
// problem we got the chars in the "names1", etc
}
}
我到底错过了什么?