Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save akanehara/17dd9f963bb8ab7f5ea9cb65ead2c0d1 to your computer and use it in GitHub Desktop.
Save akanehara/17dd9f963bb8ab7f5ea9cb65ead2c0d1 to your computer and use it in GitHub Desktop.
jqで path value の2列の表を作りたい(途中)
echo '{"hoge":99, "children":[{"hoge":3},{"hoge":255}]}' | jq -r 'leaf_paths | map(if type=="number" then "["+tostring+"]" else "."+tostring+"" end) | join("")'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment