qntfy / kazaam

Arbitrary transformations of JSON in Golang
MIT License
283 stars 54 forks source link

multiple array append in shift is not working as expected #78

Open JoshuaC215 opened 6 years ago

JoshuaC215 commented 6 years ago

As described in #77 spec:

{
  "operation": "shift",
  "spec": {
    "arr[+]": "key1",
    "arr[+]": "key2",
    "arr[+]": "key3"
  }
}

Input:

{ 
   "key1": "field1",
   "key2": "field2",
   "key3": "field3"
}

Expected output: {"arr":["field1", "field2", "field3"]} Actual output: {"arr":["field3"]}