All, I am trying to transfrom a json. I want the final to look like:
"TestArray": [{
            "Place": "Test1",
            "Holder": "Test2"
        },
        {
            "Place": "Test3",
            "Holder": "Test4"
        }
My source Json is flat with these specs:
 "Place1" : "Test1",
  "Holder1" : "Test2",
  "Place2" : "Test3",
  "Holder2" : "Test4"

With this transform:

[
  {
    "operation": "shift",
    "spec": {
      "@Place1": "TestArray[].Place",
      "@Holder1": "TestArray[].Holder",
      "@Place2": "TestArray[].Place",
      "@Holder2": "TestArray[].Holder"
    }
  }
    ]

I get the following result:

{
  "TestArray" : [ {
    "Payer" : "Test1"
  }, {
    "PolicyNumber" : "Test2"
  }, {
    "Payer" : "Test3"
  }, {
    "PolicyNumber" : "Test4"
  } ]
}

Does anyone have any insight as to how to fix my problem? I am at a loss
here and Am not quite sure where to go.

Reply via email to