官术网_书友最值得收藏!

jq

jq is a lightweight tool for processing and transforming JSON. It follows the Unix philosophy of doing one thing and doing it well. It can be found at https://stedolan.github.io/jq/.

While jq and JMESPath are similar, jq is a lot easier to get started with. It also supports transforming JSON into plaintext; JMESPath queries will always return more JSON.

You can pipe JSON results from the CLI tool to it, and easily transform the results for use elsewhere. This example uses jq's property name selectors to convert JSON output to text:

$ aws ec2 describe-availability-zones --output json | jq '.AvailabilityZones[].ZoneName'
"us-east-1a"
"us-east-1c"
"us-east-1d"
"us-east-1e"
主站蜘蛛池模板: 泸西县| 秭归县| 宁武县| 海口市| 商洛市| 华阴市| 横山县| 桑日县| 盘锦市| 石泉县| 武义县| 化德县| 扬州市| 南宫市| 南川市| 九江市| 繁峙县| 礼泉县| 承德县| 宜州市| 运城市| 新野县| 马鞍山市| 宁陵县| 苍山县| 涪陵区| 自贡市| 米泉市| 宿迁市| 高阳县| 丰都县| 桂阳县| 安宁市| 周至县| 洞头县| 平湖市| 江北区| 石台县| 宜兰县| 克什克腾旗| 应用必备|