以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- [求助]jo这个怎么回事 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=192953) |
-- 作者:18523982317 -- 发布时间:2024/8/5 10:43:00 -- [求助]jo这个怎么回事 假设下面的内容我存在r行的(“joword”)列里面 Dim r As Row = CurrentTable.Current Dim s As String = r("Jowrod") Dim jo As JObject = JObject.Parse(s) Output.Show(jo("words_result")("result").ToString()) 能输出jo("words_result"),但是输出不出来jo("words_result")("result"), 我想要等到words_result----result----AmountInWords---word的值该怎么表述 可能这个问题有点低级,单是我对jo一直有点研究不透 总觉得很麻烦,麻烦大佬们说一下 { "words_result": [ { "result": { "AmountInWords": [ { "word": "贰仟捌佰捌拾圆整" } ], "InvoiceNumConfirm": [ { "word": "24502000000035109355" } ], "CommodityEndDate": [], "CommodityVehicleType": [], "CommodityStartDate": [], "CommodityPrice": [ { "row": "1", "word": "70.7964601769912" }, { "row": "2", "word": "265.486725663717" }, { "row": "3", "word": "106.194690265487" }, { "row": "4", "word": "1840.70796460177" }, { "row": "5", "word": "194.690265486726" } ], "InvoiceTag": [ { "word": "其他" } ], "NoteDrawer": [ { "word": "*" } ], "SellerAddress": [], "CommodityNum": [ { "row": "1", "word": "2" }, { "row": "2", "word": "1" }, { "row": "3", "word": "1" }, { "row": "4", "word": "1" }, { "row": "5", "word": "1" } ], "SellerRegisterNum": [ { "word": "91500103790713258G" } ], "Remarks": [ { "word": "购方开户银行:中国农业银行重庆渝北洋河支行;银行账号:31110301040013988:销方开户银行:中国农业银行股份有限公司重庆渝中两路口支行;银行账号:31010801040005893;" } ], "SellerBank": [], "MachineCode": [], "CommodityTaxRate": [ { "row": "1", "word": "13%" }, { "row": "2", "word": "13%" }, { "row": "3", "word": "13%" }, { "row": "4", "word": "13%" }, { "row": "5", "word": "13%" } ], "ServiceType": [ { "word": "电器设备" } ], "TotalTax": [ { "word": "331.33" } ], "InvoiceCodeConfirm": [], "CheckCode": [], "InvoiceCode": [], "InvoiceDate": [ { "word": "2024年04月28日" } ], "PurchaserRegisterNum": [ { "word": "9150000071160023XL" } ], "InvoiceTypeOrg": [ { "word": "电子发票(增值税专用发票)" } ], "Password": [], "OnlinePay": [], "Agent": [ { "word": "否" } ], "AmountInFiguers": [ { "word": "2880.00" } ], "PurchaserBank": [], "Checker": [], "City": [], "TotalAmount": [ { "word": "2548.67" } ], "CommodityAmount": [ { "row": "1", "word": "141.59" }, { "row": "2", "word": "265.49" }, { "row": "3", "word": "106.19" }, { "row": "4", "word": "1840.71" }, { "row": "5", "word": "194.69" } ], "PurchaserName": [ { "word": "远海建工(集团)有限公司" } ], "CommodityType": [ { "row": "1", "word": "搓纸轮" }, { "row": "2", "word": "齿轮" }, { "row": "4", "word": "2554" }, { "row": "5", "word": "皮带" } ], "Province": [], "InvoiceType": [ { "word": "电子发票(专用发票)" } ], "SheetNum": [], "PurchaserAddress": [], "InvoiceNumDigit": [], "CommodityTax": [ { "row": "1", "word": "18.41" }, { "row": "2", "word": "34.51" }, { "row": "3", "word": "13.81" }, { "row": "4", "word": "239.29" }, { "row": "5", "word": "25.31" } ], "CommodityPlateNum": [], "CommodityUnit": [ { "row": "1", "word": "个" }, { "row": "2", "word": "套" }, { "row": "3", "word": "个" }, { "row": "4", "word": "个" }, { "row": "5", "word": "个" } ], "Payee": [], "CommodityName": [ { "row": "1", "word": "*复印胶版印制设备*配件" }, { "row": "2", "word": "*复印胶版印制设备*配件" }, { "row": "3", "word": "*复印胶版印制设备*刮板" }, { "row": "4", "word": "*复印胶版印制设备*套鼓" }, { "row": "5", "word": "*复印胶版印制设备*配件" } ], "SellerName": [ { "word": "重庆奥创办公设备有限公司" } ], "InvoiceNum": [ { "word": "24502000000035109355" } ] }, "top": 182, "left": 16, "probability": 0.8983392715, "width": 892, "type": "vat_invoice", "height": 1593 } ], "words_result_num": 1, "log_id": 1820263358716488916 }
|
-- 作者:18523982317 -- 发布时间:2024/8/5 11:00:00 -- Dim r As Row = CurrentTable.Current Dim s As String = r("Jowrod") Dim jo As JObject = JObject.Parse(s) For Each jt As JToken In jo("words_result") For Each jt1 As JToken In jt("result")("AmountInWords") Output.Show(jt1("word").ToString) Next Next 参照帮助居然写出来了 能输出,有没得简单点的办法
|
-- 作者:有点蓝 -- 发布时间:2024/8/5 11:13:00 -- words_result是一个数组 |
-- 作者:18523982317 -- 发布时间:2024/8/5 11:21:00 -- 不行啊 ,报错,表达式不产生值 |
-- 作者:18523982317 -- 发布时间:2024/8/5 11:24:00 -- Output.Show(jo("words_result")(0)("result")("AmountInWords")(0)("word").ToString()) 写出来了,感谢,不能用[]符号
|
-- 作者:有点蓝 -- 发布时间:2024/8/5 11:27:00 -- 以下是引用18523982317在2024/8/5 11:24:00的发言:
忘记了,写成了C#的语法
Output.Show(jo("words_result")(0)("result")("AmountInWords")(0)("word").ToString()) 写出来了,感谢,不能用[]符号
|