jq命令可以过滤json格式数据
1 | 安装 https://stedolan.github.io/jq/ |
操作演示
cat test.json | jq
cat 1.json |jq -r '.timeDelay[].duration' 过滤出duration里的数据
1 | cat 1.json |jq -r '.timeDelay[] |select (.url | contains(“http:/as/index”))' |
有个弊端就是不支持key是数字的
1 | # 批量过滤数据脚本 |
Evething will be ok!
1 | 安装 https://stedolan.github.io/jq/ |
cat test.json | jq
cat 1.json |jq -r '.timeDelay[].duration' 过滤出duration里的数据
1 | cat 1.json |jq -r '.timeDelay[] |select (.url | contains(“http:/as/index”))' |
有个弊端就是不支持key是数字的
1 | # 批量过滤数据脚本 |
微信支付
支付宝