Skip to content

Commit

Permalink
Adding JSON2CSV
Browse files Browse the repository at this point in the history
  • Loading branch information
sharatsc committed Apr 11, 2017
1 parent 4ec0dd9 commit 2556356
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions jq/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ Explore the commits to the repository
curl https://api.github.com/repos/sharatsc/cdse/commits | more
curl https://api.github.com/repos/sharatsc/cdse/commits | jq '.[]|.commit.message'
curl https://api.github.com/repos/sharatsc/cdse/commits | jq '.[] | {message: .commit.message, name: .commit.committer.name}'

# Convert to CSV
curl https://api.github.com/repos/sharatsc/cdse/commits | jq -c '.[] | {"message": .commit.message, "name": .commit.committer.name}' | json2csv -k message,name
</code></pre>

## More examples
Expand Down

0 comments on commit 2556356

Please sign in to comment.