JQ Tool: Difference between revisions
Jump to navigation
Jump to search
Line 11: | Line 11: | ||
(curl -s 'https://raw.githubusercontent.com/datasets/geo-boundaries-world-110m/master/countries.geojson')|jq '.features[0:1][0].properties |keys' | (curl -s 'https://raw.githubusercontent.com/datasets/geo-boundaries-world-110m/master/countries.geojson')|jq '.features[0:1][0].properties |keys' | ||
(curl -s 'https://raw.githubusercontent.com/datasets/geo-boundaries-world-110m/master/countries.geojson')|jq '{type: .type , features: .features}' | (curl -s 'https://raw.githubusercontent.com/datasets/geo-boundaries-world-110m/master/countries.geojson')|jq '{type: .type , features: .features}' | ||
</source> | |||
<source lang="bash"> | |||
(curl -s 'https://raw.githubusercontent.com/datasets/geo-boundaries-world-110m/master/countries.geojson')|jq '[.features[].properties.pop_est]|min' | (curl -s 'https://raw.githubusercontent.com/datasets/geo-boundaries-world-110m/master/countries.geojson')|jq '[.features[].properties.pop_est]|min' | ||
(curl -s 'https://raw.githubusercontent.com/datasets/geo-boundaries-world-110m/master/countries.geojson')|jq '[.features[].properties.pop_est]|max' | (curl -s 'https://raw.githubusercontent.com/datasets/geo-boundaries-world-110m/master/countries.geojson')|jq '[.features[].properties.pop_est]|max' | ||
(curl -s 'https://raw.githubusercontent.com/datasets/geo-boundaries-world-110m/master/countries.geojson')|jq '[.features[].properties.economy]|unique' | (curl -s 'https://raw.githubusercontent.com/datasets/geo-boundaries-world-110m/master/countries.geojson')|jq '[.features[].properties.economy]|unique' | ||
(curl -s 'https://raw.githubusercontent.com/datasets/geo-boundaries-world-110m/master/countries.geojson')|jq '[.features[].properties.economy]|unique[]' | (curl -s 'https://raw.githubusercontent.com/datasets/geo-boundaries-world-110m/master/countries.geojson')|jq '[.features[].properties.economy]|unique[]' | ||
</source> | |||
<source lang="bash"> | |||
(curl -s 'https://raw.githubusercontent.com/datasets/geo-boundaries-world-110m/master/countries.geojson')|jq '[.features[].properties.pop_est]|sort' | (curl -s 'https://raw.githubusercontent.com/datasets/geo-boundaries-world-110m/master/countries.geojson')|jq '[.features[].properties.pop_est]|sort' | ||
(curl -s 'https://raw.githubusercontent.com/datasets/geo-boundaries-world-110m/master/countries.geojson')|jq '[.features[].properties.pop_est]|sort[]'|head | (curl -s 'https://raw.githubusercontent.com/datasets/geo-boundaries-world-110m/master/countries.geojson')|jq '[.features[].properties.pop_est]|sort[]'|head |
Revision as of 18:45, 4 September 2021
sudo apt update sudo apt list --upgradable
sudo apt upgrade sudo apt install jq sudo apt --fix-broken install
Knowledge
(curl -s 'https://raw.githubusercontent.com/datasets/geo-boundaries-world-110m/master/countries.geojson')|jq '.features |length'
(curl -s 'https://raw.githubusercontent.com/datasets/geo-boundaries-world-110m/master/countries.geojson')|jq '.features[0:1][0].properties |keys'
(curl -s 'https://raw.githubusercontent.com/datasets/geo-boundaries-world-110m/master/countries.geojson')|jq '{type: .type , features: .features}'
(curl -s 'https://raw.githubusercontent.com/datasets/geo-boundaries-world-110m/master/countries.geojson')|jq '[.features[].properties.pop_est]|min'
(curl -s 'https://raw.githubusercontent.com/datasets/geo-boundaries-world-110m/master/countries.geojson')|jq '[.features[].properties.pop_est]|max'
(curl -s 'https://raw.githubusercontent.com/datasets/geo-boundaries-world-110m/master/countries.geojson')|jq '[.features[].properties.economy]|unique'
(curl -s 'https://raw.githubusercontent.com/datasets/geo-boundaries-world-110m/master/countries.geojson')|jq '[.features[].properties.economy]|unique[]'
(curl -s 'https://raw.githubusercontent.com/datasets/geo-boundaries-world-110m/master/countries.geojson')|jq '[.features[].properties.pop_est]|sort'
(curl -s 'https://raw.githubusercontent.com/datasets/geo-boundaries-world-110m/master/countries.geojson')|jq '[.features[].properties.pop_est]|sort[]'|head
(curl -s 'https://raw.githubusercontent.com/datasets/geo-boundaries-world-110m/master/countries.geojson')|jq '[.features[].properties.pop_est]|sort[]'|tail