logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Catmandu::Fix::move_field - move a field to another place in the data structure

Name

       Catmandu::Fix::move_field - move a field to another place in the data structure

See Also

       Catmandu::Fix

perl v5.40.0                                       2025-01-17                     Catmandu::Fix::move_field(3pm)

Synopsis

          # Move single fields

          # Move 'foo.bar' to 'bar.foo'
          move_field(foo.bar, bar.foo)

          # Move multipe fields
          # Data:
          # a:
          #   b: test1
          #   c: test2
          move_field(a,z)  # -> Move all the 'a' to 'z'
                           # z:
                           #   b: test1
                           #   c: test2
          # Data:
          # a:
          #   b: test1
          #   c: test2
          move_field(a,.)  # -> Move the fields 'b' and 'c' to the root
                           # b: test1
                           # c: test2

See Also