JQ Tool: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
{|
{|
| valign="top" |
| valign="top" |
'''ubuntu:'''
  sudo apt update
  sudo apt update
  sudo apt list --upgradable
  sudo apt list --upgradable
Line 9: Line 10:


| valign="top" |
| valign="top" |
'''windows:'''
  1. Press '''⊞ + R'''
  1. Press '''⊞ + R'''
  2. Type in '''PowerShell'''
  2. Type in '''PowerShell'''

Revision as of 18:54, 4 September 2021

ubuntu:
sudo apt update
sudo apt list --upgradable

sudo apt upgrade
sudo apt install jq 
sudo apt --fix-broken install
windows:
1. Press ⊞ + R
2. Type in PowerShell
run as administrator user
3. Press Ctrl + Shift + Enter
4. Choose Yes and Press Enter
5. chocolatey install jq   

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

References