玖爱辅助网为您提供最新免费游戏辅助(绝地求生.CF.lol.QQ飞车.守望先锋等),QQ活动,QQ教程,QQ软件,易语言源码,易语言教程等信息 - 凌哥QQ:1027663760

易语言json取值问题

浏览次数:13860发布时间:分类:易语言问答评论数量:加载中

本站的易语言问答相关内容均转载自精易论坛

问题

[{"id":1,"itemCode":"2402020800765","itemId":"597469089909","itemIdAndCode":{"itemCode":"2402020800765","itemId":"597469089909"},"itemName":"进口花王浴室清洁剂玫瑰香1L","itemProp":{"areaSale":true,"batchInfo":[{"batchCode":"520000005113123"}],"lockupDays":273,"measureGoods":false,"skuDisclaimer":false},"itemVolume":"1350","itemWeight":"1200","lackType":"","measureGoods":false,"outerSpuId":"597646734875","outerSpuIdAndName":{"outerSpuId":"597646734875","outerSpuName":"进口花王浴室清洁剂神器玻璃瓷砖强力去污除垢防霉除菌魔术灵2瓶"},"outerSpuName":"进口花王浴室清洁剂神器玻璃瓷砖强力去污除垢防霉除菌魔术灵2瓶","planQuantity":1,"precious":{"precious":false,"value":"-"},"price":"55.67","realQuantity":1},{"id":2,"itemCode":"6928820085622","itemId":"549659059293","itemIdAndCode":{"itemCode":"6928820085622","itemId":"549659059293"},"itemName":"【天猫超市】L'oreal/欧莱雅欧莱雅茶树植萃去屑净油洗发露500ml 500ml","itemProp":{"areaSale":true,"batchInfo":[{"batchCode":"520000007415173"}],"lockupDays":273,"measureGoods":false,"skuDisclaimer":false},"itemVolume":"1030","itemWeight":"568","lackType":"","measureGoods":false,"outerSpuId":"549616687040","outerSpuIdAndName":{"outerSpuId":"549616687040","outerSpuName":"欧莱雅美发茶树植萃去屑控油洗发水女无硅油去屑止痒洗发水露正品"},"outerSpuName":"欧莱雅美发茶树植萃去屑控油洗发水女无硅油去屑止痒洗发水露正品","planQuantity":1,"precious":{"precious":false,"value":"-"},"price":"48.37","realQuantity":1},{"id":3,"itemCode":"6947230500839","itemId":"597730042323","itemIdAndCode":{"itemCode":"6947230500839","itemId":"597730042323"},"itemName":"利得加厚背心垃圾袋50cm*60cm*100只家用垃圾袋分类","itemProp":{"areaSale":true,"batchInfo":[{"batchCode":"520000005894740"}],"lockupDays":456,"measureGoods":false,"skuDisclaimer":false},"itemVolume":"756","itemWeight":"380","lackType":"","measureGoods":false,"outerSpuId":"597919467521","outerSpuIdAndName":{"outerSpuId":"597919467521","outerSpuName":"利得加厚背心垃圾袋50cm*60cm*100只家用一次性垃圾袋分类厨房"},"outerSpuName":"利得加厚背心垃圾袋50cm*60cm*100只家用一次性垃圾袋分类厨房","planQuantity":1,"precious":{"precious":false,"value":"-"},"price":"7.66","realQuantity":1}]

上面是json内容

问题是:如何一次性分别取出所有outerSpuName,price 这两个值得内容。

解答

.版本 2 .支持库 spec .局部变量 json, 类_json .局部变量 n, 整数型 .局部变量 outerSpuName, 文本型 .局部变量 price, 文本型 json.解析 (#常量1) .计次循环首 (json.成员数 (“”), n) outerSpuName = json.取通用属性 (“[” + 到文本 (n - 1) + “].outerSpuIdAndName.outerSpuName”) price = json.取通用属性 (“[” + 到文本 (n - 1) + “].price”) 调试输出 (outerSpuName, price) .计次循环尾 ()


本文链接:https://www.9ifuzhu.com/eyywd/2263.html

上一篇:换了个电脑ADO打开数据库错误

下一篇:json格式化成文本的函数 有没有

易语言问答 - 最新内容

0