Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

Jq basics

[root@ip-10-31-4-69 inventories]# ./hosts --list | jq '.tag_Role_kube_node'

[
 "kube_node_1"
 ]

Jq remove square brackets [] : use []
Output

 [root@ip-10-31-4-69 inventories]# ./hosts --list | jq '.tag_Role_kube_node[]'
 "kube_node_1"

Jq remove quote “” : use -r
Output

 [root@ip-10-31-4-69 inventories]# ./hosts --list | jq -r '.tag_Role_kube_node[]'
 kube_node_1