Skip to content

Instantly share code, notes, and snippets.

@jgogstad
Created November 16, 2021 14:06
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save jgogstad/af2a261f0f4f6bae36846a83cc735f40 to your computer and use it in GitHub Desktop.
JSON to markdown

JSON → Markdown

brew install csvkit
jq -r '["pt", "c"], (.[] | [.pt, .c]) | @csv' <<< '[
  {
    "pt": "2021-11-15",
    "c": "250770543"
  },
  {
    "pt": "2021-11-14",
    "c": "172221"
  },
  {
    "pt": "2021-11-13",
    "c": "192409"
  }
]' | csvlook
|         pt |           c |
| ---------- | ----------- |
| 2021-11-15 | 250,770,543 |
| 2021-11-14 |     172,221 |
| 2021-11-13 |     192,409 |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment