I have two Json payload. I want to merge them in a single Json object

前端 未结 2 796
被撕碎了的回忆
被撕碎了的回忆 2021-01-23 02:44

I have two payloads and want to merge them into single JSON object (streaming join). At few places people are suggesting to use AttributesToJSON, but as one of the JSON does not

2条回答
  •  无人共我
    2021-01-23 03:13

    Easy! Just use MergeContent and set the following configuration:

    Merge Format: Binary Concatenation
    Minimum Number of Entries: 2
    Delimiter Strategy: Text
    Header: [
    Footer: ]
    Demarcator: ,
    

    (You could use MergeRecord but it is a little buggy for me at least).

    Then transfer to JoltTrasnformJSON and set Jolt Transformation DSL to Shift and Jolt Specification to:

    {
        "*": {
          "*": "&"
        }
    }
    

    This should do the job :)

提交回复
热议问题