Curl and jq with pipes
Bash Pipe Commands explained
sudo apt-get install curl jq -y && curl -s "http://files.olo.com/pizzas.json" | jq -r '.[].toppings | @csv' | sort | uniq -c | sort -bgr | head -20 | catInstall cURL and jq if not on the debian Linux variant
sudo apt-get install curl jq -y Grab the file contents with cURL
curl -s "http://files.olo.com/pizzas.json"Use jq to parse the JSON with property you would like and then export to flat file format of csv
jq -r '.[].toppings | @csv' Sort the rows
sortCount the unique lines
uniq -cSort the data again with these options because each line now starts with its count in the previous input file like so: 156 "beef"
-b, --ignore-leading-blanks
-g, --general-numeric-sort
-r, --reverse
sort -bgrGet the first 20 highest count values from sorted data
head -20Finally output results
cat