Want to be a when handling nested data?
Specter is a library for Clojure/ClojureScript that makes it simple to navigate through and change nested data. It’s a ‘swiss army knife’ for handling complex data structures.
With it you can:
- Query values in a nested structure
- Change each key or value in a nested map
- Change each value in a nested sequence
- Append or prepend values in a nested map or sequence
- Add (or remove) a value at a specific place in a map or sequence
I’ve written a general introduction to using Specter for navigating, querying and changing nested data. It’s aimed at beginners/intermediates and works through some different examples.
Specter is amazing, well worth the time to learn it. My article is really just scratching the surface … there are more advanced capabilities to discover! Feedback welcome - maybe use-cases not covered?