Jsonpatch v0.6.2 Jsonpatch.FlatMap View Source

Forms structs in a flat format with paths instead of nested maps/structs.

Link to this section Summary

Functions

Parses any map with/out arrays to a flat map.

Link to this section Functions

Specs

parse(map()) :: map()

Parses any map with/out arrays to a flat map.

Examples

iex> source = %{"a" => "b", "c" => ["d", "f"], "g" => %{"h" => "i"}}
iex> Jsonpatch.FlatMap.parse(source)
%{"/a" => "b", "/c/0" => "d", "/c/1" => "f", "/g/h" => "i"}