Jetons.Map (jetons v0.2.0)

Copy Markdown View Source

Generic map utilities for working with nested maps.

Summary

Functions

Recursively merges two maps, with right-side values taking precedence.

Functions

deep_merge(left, right)

Recursively merges two maps, with right-side values taking precedence.

Examples

iex> Jetons.Map.deep_merge(%{"a" => %{"b" => 1}}, %{"a" => %{"c" => 2}})
%{"a" => %{"b" => 1, "c" => 2}}

iex> Jetons.Map.deep_merge(%{"a" => 1}, %{"a" => 2})
%{"a" => 2}