Created
May 30, 2020 00:35
-
-
Save hoelzro/85eb705f4d95209128992564e3e40d7b 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
def ddb_unpack(item): | |
item | | |
with_entries({ | |
key: .key, | |
value: (.value | to_entries[0] | if .key == "NULL" then | |
null | |
elif .key == "L" then | |
.value | map(ddb_unpack({key:.}).key) # XXX this sucks | |
elif .key == "M" then | |
ddb_unpack(.value) | |
else | |
.value | |
end) | |
}) ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment