1

I want to use a jolt transformation to concatenate two lists

Input

{
    "listA": [
        1,
        2,
        3
    ],
    "listB": [
        4,
        5
    ]
}

Jolt Spec

[{
    "operation": "shift",
    "spec": {
        "listA": "items",
        "listB": "items"
    }
}]

Desired Output:

{
  "items" : [ 1, 2, 3, 4, 5 ]
}

I am getting a nested list. How can I get a flat list like in the desired output?

1 Answer 1

2
[
   {
     "operation": "shift",
     "spec": {
       "listA": {
         "*": "items[]"
       },
       "listB": {
         "*": "items[]"
       }
     }
  }
]
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.