View Source Jsonpatch.Operation.Move (Jsonpatch v2.2.1)

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.Move.apply(move, target, [])
{:ok, %{"a" => %{"e" => %{"c" => "Bob"}}, "d" => false}}

Summary

Types

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

Functions