Skip to content

Instantly share code, notes, and snippets.

@NikiforovAll
Created May 6, 2020 20:51
Show Gist options
  • Save NikiforovAll/a376411f7507d45e018fcc9ebaef28d2 to your computer and use it in GitHub Desktop.
Save NikiforovAll/a376411f7507d45e018fcc9ebaef28d2 to your computer and use it in GitHub Desktop.
jq-examples
jq -s '.[0] as $hstt | .[1] | map(.transport = $hstt[.base])' hs-tt.json usage2.json // enrich data with slurp
jq '[{ r: .root[], s: .services } | .r as $r | select(.s | contains([$r.base])) | .r | select(.base | length > 2 )] | unique_by(.invocation + .base) | sort_by(.
base)' t.json > usage2.json // join
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment