Created
March 12, 2022 14:03
-
-
Save d3banjan/b292d5f6ba20991441e88f66a5d5a36c to your computer and use it in GitHub Desktop.
jq-recipes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -L "https://raw.githubusercontent.com/noSenseOfDangerous/PythonDesignPattern/master/factoryPattern_01/data/donut.json" -o donut.json | |
# % Total % Received % Xferd Average Speed Time Time Time Current | |
# Dload Upload Total Spent Left Speed | |
# 100 2895 100 2895 0 0 14532 0 --:--:-- --:--:-- --:--:-- 14547 | |
ls -lh . | |
# total 4,0K | |
# -rw-r--r-- 1 debanjan debanjan 2,9K 12. Mär 15:02 donut.json | |
wc -l * | |
# 129 donut.json | |
jq '.' donut.json | |
# [ | |
# { | |
# "id": "0001", | |
# "type": "donut", | |
# "name": "Cake", | |
# "ppu": 0.55, | |
# "batters": { | |
# "batter": [ | |
# { | |
# "id": "1001", | |
# "type": "Regular" | |
# }, | |
# { | |
# "id": "1002", | |
# "type": "Chocolate" | |
# }, | |
# { | |
# "id": "1003", | |
# "type": "Blueberry" | |
# }, | |
# { | |
# "id": "1004", | |
# "type": "Devil's Food" | |
# } | |
# ] | |
# }, | |
# "topping": [ | |
# { | |
# "id": "5001", | |
# "type": "None" | |
# }, | |
# { | |
# "id": "5002", | |
# "type": "Glazed" | |
# }, | |
# { | |
# "id": "5005", | |
# "type": "Sugar" | |
# }, | |
# { | |
# "id": "5007", | |
# "type": "Powdered Sugar" | |
# }, | |
# { | |
# "id": "5006", | |
# "type": "Chocolate with Sprinkles" | |
# }, | |
# { | |
# "id": "5003", | |
# "type": "Chocolate" | |
# }, | |
# { | |
# "id": "5004", | |
# "type": "Maple" | |
# } | |
# ] | |
# }, | |
# { | |
# "id": "0002", | |
# "type": "donut", | |
# "name": "Raised", | |
# "ppu": 0.55, | |
# "batters": { | |
# "batter": [ | |
# { | |
# "id": "1001", | |
# "type": "Regular" | |
# } | |
# ] | |
# }, | |
# "topping": [ | |
# { | |
# "id": "5001", | |
# "type": "None" | |
# }, | |
# { | |
# "id": "5002", | |
# "type": "Glazed" | |
# }, | |
# { | |
# "id": "5005", | |
# "type": "Sugar" | |
# }, | |
# { | |
# "id": "5003", | |
# "type": "Chocolate" | |
# }, | |
# { | |
# "id": "5004", | |
# "type": "Maple" | |
# } | |
# ] | |
# }, | |
# { | |
# "id": "0003", | |
# "type": "donut", | |
# "name": "Old Fashioned", | |
# "ppu": 0.55, | |
# "batters": { | |
# "batter": [ | |
# { | |
# "id": "1001", | |
# "type": "Regular" | |
# }, | |
# { | |
# "id": "1002", | |
# "type": "Chocolate" | |
# } | |
# ] | |
# }, | |
# "topping": [ | |
# { | |
# "id": "5001", | |
# "type": "None" | |
# }, | |
# { | |
# "id": "5002", | |
# "type": "Glazed" | |
# }, | |
# { | |
# "id": "5003", | |
# "type": "Chocolate" | |
# }, | |
# { | |
# "id": "5004", | |
# "type": "Maple" | |
# } | |
# ] | |
# } | |
# ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment