Skip to content

Instantly share code, notes, and snippets.

@mdlincoln
Last active August 29, 2015 14:22
Show Gist options
  • Save mdlincoln/0cbf4c12ddf3f389935e to your computer and use it in GitHub Desktop.
Save mdlincoln/0cbf4c12ddf3f389935e to your computer and use it in GitHub Desktop.
jq filter to turn RDF JSON into CSV
.head.vars as $fields | ($fields | @csv), (.results.bindings[] | [.[$fields[]].value] | @csv)
@mdlincoln
Copy link
Author

Be sure to run jq using the -r flag to write out the results as properly escaped text.

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