Skip to content

Instantly share code, notes, and snippets.

@nickpeihl
Created December 15, 2022 19:31
Show Gist options
  • Save nickpeihl/178b6ab72f575212891b6f9591403170 to your computer and use it in GitHub Desktop.
Save nickpeihl/178b6ab72f575212891b6f9591403170 to your computer and use it in GitHub Desktop.
JQ command to convert array of JSON docs to NDJSON for bulk input
`jq -c ' .[] | { index: { _index: "<my-index>"} }, .' < ./<my-file>.json > my-file-bulk.ndjson`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment