Jsonpatch.Operation.Move (Jsonpatch v0.12.0) View Source

Move operations change the position of values in map or struct.

Examples

iex> move = %Jsonpatch.Operation.Move{from: "/a/b", path: "/a/e"}
iex> target = %{"a" => %{"b" => %{"c" => "Bob"}}, "d" => false}
iex> Jsonpatch.Operation.apply_op(move, target)
%{"a" => %{"e" => %{"c" => "Bob"}}, "d" => false}

Link to this section Summary

Link to this section Types

Specs

t() :: %Jsonpatch.Operation.Move{from: String.t(), path: String.t()}