Dim jo As new jobject
For Each c As Col In Tables("普通短信").cols
'MessageBox.Show(vars("uuid") )
jo(c.name) = cstr(Tables("普通短信").current(c.name))
Next
Dim js As String =jo.Tostring()
output.show("以下是json文件")
output.show(js)
上述代码是遍历普通短信表的所有列所有行 有没有办法 先实现遍历符合条件的行 然后在遍历列呢?
如果采用下列写法:
Dim jo As new jobject
Dim t As Table= Tables("普通短信").Filter="uuid ='" & vars("uuid") &"'"
For Each c As Col In t.cols
jo(c.name) = cstr(t.current(c.name))
Next
Dim js As String =jo.Tostring()
output.show("以下是json文件")
output.show(js)
运行提示:
此主题相关图片如下:1.png