-
-
Save mrsrvman/2414828a91d4e8eb31902b3b794f2f77 to your computer and use it in GitHub Desktop.
This file contains 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
# Use `jq` with both JSON and non-JSON lines. | |
function jjq { | |
jq -R -r "${1:-.} as \$line | try fromjson catch \$line" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment