请问,假设有一个json
{
“test”: {
“a”: {“one”: “123”},
“b”: {“two”: “456”},
“c”: {“three”: “456”},
“d”: {“four”: “456”},
“e”: {“five”: “456”},
“f”: {“six”: “456”},
“g”: {“seven”: “456”}
}
}
这个json想要连续读取,
我知道要连续读取one two three four的话
是 for(let i=0;i<object.keys(json.test).length;i++)
{
cc.log("test : " + object.keys(json.test)[i]);
}
但我想读所有的456时, 把object.keys改成object.values却没有用,
想问大老,要连续读取的话要怎么写才好