Skip to content

Instantly share code, notes, and snippets.

@aasmith
Created September 19, 2017 21:23
Show Gist options
  • Save aasmith/21f39c87509ddc0e472af6f7d1f23278 to your computer and use it in GitHub Desktop.
Save aasmith/21f39c87509ddc0e472af6f7d1f23278 to your computer and use it in GitHub Desktop.
How to decode nested json with jq
# Typical use-case is decoding an AWS STS message. The DecodedMessage key contains escaped JSON.
jq '.DecodedMessage | fromjson | .' message.json
@aclarknexient
Copy link

Thank you for sharing this, a google search brought me here :)

@commondatageek
Copy link

Also, I had exactly the same use case -- unescaping json from a decoded STS message :D

Thanks!

@mmieluch
Copy link

This is fantastic, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment