1 2 3 4 5 6 | git clone https://github.com/stedolan/jq.git cd jq autoreconf -i ./configure --disable-maintainer-mode make sudo make install |
1 2 3 4 | #xxx.JSON 中是我们要处理的 JSON 数据,我们可以直接将文件名传给 jq $ jq -r '.' xxx.JSON #或者由其他程序读出文件内容,并传给 jq $ cat xxx.JSON|jq -r '.' |
1 2 | #result is 5 6 7 8 jq -n '([1,2]|.[])+([4,6]|.[])' |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |