实现效果:
- Element.GetAllInJson命令例子修正
原例子运行效果:分析判断:判断结论:Call 遍历table(table)这句是错误的因为table并非一维
修正后运行效果:源码一览:Dim json, table
json = Element.GetAllInJson()
TracePrint json
table = Encode.JsonToTable(json)
TracePrint UBound( table)+1'个数
For j = 0 To UBOUND(table)
Call 遍历table(table(j))
Next
Function 遍历table(table)
TracePrint "=========================="
For Each k, v In table
If k = "children" Then
For Each k2, v2 In v
遍历table(v2)
Next
Else
TracePrint k & ":" & CStr(v)
End If
Next
End Function