Fork me on GitHub
#specter
<
2022-03-30
>
fs4217:03:20

Changing keys in a (nested) dict? (repost from datalog channel) When you receive data as json, and you have to transform it into nice looking entries to feed into your datalog-db, you'll have to translate those json keys as strings into clj keywords. What is the right tool to use to make those transformations the least painful? I've been looking at (specter/setval (specter/keypath ...) but that doesn't seem to support nested key path. While (specter/setval [(specter/map-key ...) doesn't seem to support simple key substitution. Any suggestions/advise?

steveb8n21:03:05

try walk/keywordize-keys

fs4218:03:22

Thanks for the suggestion - will do.