Created
March 15, 2022 17:47
-
-
Save bradyclifford/78247cff84341ba1ca27a1a15d477be7 to your computer and use it in GitHub Desktop.
JQ Scripts
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
#!/bin/sh | |
JSON=$(<test.json) | |
for encodedPair in $(echo "${JSON}" | jq -r 'to_entries[] | @base64'); do | |
__jq() { | |
echo "${encodedPair}" | base64 --decode | jq -r ${1} | |
} | |
key=$(__jq '.key') | |
value=$(__jq '.value') | |
echo "::set-output name=${key}::${value}" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment