Patched

Patched

23.1k Downloads

[Question] Is it possible to move an object to a property of itself?

SettingDust opened this issue · 3 comments

commented

Like below

{
  "a": {
    "b": 1
  }
}

to

{
  "a": {
    "c": {
      "b": 1
    }
  }
}

Move the a to a.c

commented

I believe the following should work:

[
  {
    "op": "move",
    "from": "/a",
    "path": "/_temp"
  },
  {
    "op": "add",
    "path": "/a",
    "value": {}
  },
  {
    "op": "move",
    "from": "_temp",
    "path": "/a/c"
  }
]
commented

Error.

图片

TraversalException: /elements/0/element/delegate: No such child delegate

commented

Oh. It's working. Forget to remove the generated before