#安装
https://centos.pkgs.org/7/epel-x86_64/jq-1.6-2.el7.x86_64.rpm.html
https://centos.pkgs.org/7/epel-x86_64/oniguruma-6.8.2-1.el7.x86_64.rpm.html
yum install oniguruma-6.8.2-1.el7.x86_64.rpm jq-1.6-2.el7.x86_64.rpm
#测试
echo '{"fruit":{"name":"apple","color":"green","price":1.20}}' | jq '.'
curl http://api.open-notify.org/iss-now.json | jq '.'
echo '{"fruit":{"name":"apple","color":"green","price":1.20}}' | jq '[.fruit.name,.fruit.color]'
文章评论