各位大佬,有这样一个json:
{"ret":0,"data":[{"orderType":1,"orderNumber":"LXTCQJD20220804181046","extraAmount":0.0,"customerOrderCount":"3次","orderId":35248,"customerGroup":"未分组","customOrderField":[{"name":"店铺地址","value":""}],"orderGoods":[{"amount":1,"goods":{"goodsPrice":94.0,"goodsUnit":"份","id":26763,"goodsName":"民勤沙漠蜜瓜(20斤装)"}},{"amount":5,"goods":{"goodsPrice":290.0,"goodsUnit":"份","id":26761,"goodsName":"秦安本地北京7号(50斤装)"}}],"shopName":"礼县农品汇电子商务有限责任公司","orderStatus":0,"shopAddress":"礼县永兴镇捷地村四组","onlinePayStatus":"待支付","shopCustomer":{"name":"张凤琴","telephone":"15682814716"},"totalAmount":1544.0,"couponAmount":0,"payType":"微信支付-未付款","customerId":40358,"waitPayAmount":1544.0,"shopTelephone":"15378088103","orderDate":"2022-08-0418:10:46"},{"orderType":4,"orderNumber":"LXTCQJD20220804180707","extraAmount":0.0,"customerOrderCount":"3次","orderId":35247,"customerGroup":"未分组","customOrderField":[],"orderGoods":[{"amount":1,"goods":{"goodsPrice":94.0,"goodsUnit":"份","id":26763,"goodsName":"民勤沙漠蜜瓜(20斤装)"}},{"amount":4,"goods":{"goodsPrice":240.0,"goodsUnit":"份","id":26762,"goodsName":"陕西水蜜桃(50斤装)"}},{"amount":5,"goods":{"goodsPrice":120.0,"goodsUnit":"份","id":26762,"goodsName":"陕西水蜜桃(20斤装)"}}],"shopName":"礼县农品汇电子商务有限责任公司","orderStatus":0,"shopAddress":"礼县永兴镇捷地村四组","onlinePayStatus":"已支付","totalAmount":1654.0,"couponAmount":0,"payType":"微信支付","customerId":40358,"waitPayAmount":0.0,"onlinePayAmount":1654.0,"shopTelephone":"15378088103","orderDate":"2022-08-0418:07:08"}],"errorCode":0} 我想将里面的data部分保存为变量,然后通过循环将数据写入数据表,可是使用设置变量命令给变量赋值提示找不到data,麻烦帮忙看看如何处理。
|