Skip to content

Instantly share code, notes, and snippets.

@branquito
Last active May 27, 2018 12:08
Show Gist options
  • Save branquito/72df5bd8757685e01e6fdc1f374594da to your computer and use it in GitHub Desktop.
Save branquito/72df5bd8757685e01e6fdc1f374594da to your computer and use it in GitHub Desktop.
http prompt example, combined with `jq` to show only fields of type string
get sub-agencies | jq '[.data[] | paths(strings) | add] | unique[]'
@branquito
Copy link
Author

branquito commented May 27, 2018

Similarly you can check for other types as well, by changing paths(strings) to paths(numbers), to get all the numbers

If data does not come in the same shape, try leaving out squared braces or similar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment