Last active
February 4, 2019 17:27
-
-
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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