Open beroca opened 1 year ago
https://gist.github.com/stefaneng/99db9882821620d9ba17785fdcac6794
echo '[{"key": 1}, {"key": 2}, {"key": 1}]' | jq 'group_by (.key)[] | {key: .[0].key, length: length}'
How to convert embedded (quoted) json string to json
-r output raw strings, not JSON texts;
jq -rc .stuff stuff.json
Parse your escaped JSON with jq and fromjson https://dev.to/lucassha/parse-your-escaped-json-jq-and-fromjson-4cpn
jq -r '.SecretString | fromjson | .SLACK_API_KEY'
jq