Skip to content

Instantly share code, notes, and snippets.

@Slakah
Last active February 4, 2019 17:27
Show Gist options
  • Select an option

  • Save Slakah/2fb1b6d04f56d7dc74d1486b7671e13c to your computer and use it in GitHub Desktop.

Select an option

Save Slakah/2fb1b6d04f56d7dc74d1486b7671e13c to your computer and use it in GitHub Desktop.
Debatch events using jq, complicated by the fact that .payload can be a string encoded json array.
exec jq '[. | del(.payload), if .payload | type == "string" then .payload | fromjson | .[] else .payload[] end]
| .[0] + .[1]' $@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment