Skip to content

Commit

Permalink
jq example
Browse files Browse the repository at this point in the history
  • Loading branch information
cherkavi committed Aug 29, 2024
1 parent b07770c commit 00ff090
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions linux-cheat-sheet.md
Original file line number Diff line number Diff line change
Expand Up @@ -2399,6 +2399,7 @@ aws ecr describe-repositories | jq '.repositories[] | select(.repositoryName ==
docker network inspect mysql_web_default | jq '.[0].Containers' | jq '.[] | select(.Name=="web_mysql_ui")' | jq .IPv4Address

# jq create another document filter json transform json
echo '[{"id": 1, "name": "Arthur", "age": "21"},{"id": 2, "name": "Richard", "age": "32"}]' | jq '[.[] | {id, name} ]'
echo '[{"id": 1, "name": "Arthur", "age": "21"},{"id": 2, "name": "Richard", "age": "32"}]' | jq '[.[] | {number:.id, warrior:.name} ]'

# jq convert to csv
Expand Down

0 comments on commit 00ff090

Please sign in to comment.