key_tools v0.1.0 KeyTools
Provides common functions for coercing a Map
or List
.
Summary
Functions
Deeply converts all string keys within the given Map
or List
to atoms
Deeply converts all keys within the given Map
or List
to strings
Functions
Deeply converts all string keys within the given Map
or List
to atoms.
Examples
iex(1)> KeyTools.atomize_keys %{“data” => ["Hello", "World!"]} %{data: ["Hello", "World!"]}
iex(2)> KeyTools.atomize_keys [%{"nested_data" => %{"deep" => :stuff}}] [%{nested_data: %{deep: :stuff}}]