Forum Discussion

manohar's avatar
manohar
Contributor
3 years ago

Merging segments in json

Hi there, I have input of a snap coming in as

but want to have it as and “order-line” renamed as “order-lines

Basically grouping the “data” segment.

I have tried Join, Group by Field, Mapper snaps but nothing worked. surely I am not doing right.

Any pointers on how to achieve it?

Thanks
Manohar
jsoninput.json (106.8 KB)

6 Replies

  • Hi @manohar ,

    How I see it when I use the json file, There are two same ‘data’ objects. One with only orderline and one with the other objects inside so that means that some ‘data’ objects contain the orderline and some does not.

    When i try to extend the ‘data’ object with the orderline and rename it. Only the second data object gets the new orderlines object because that ‘data’ object only contains the Order-line the other Data object just gets a ‘null’ value in the orderlines object field.

    I don’t know where you get your data from but it seems that not every data object has the order-line.

    pipeline below for more explanation
    community_pipeline_V1.0_2022_11_10.slp (124.9 KB)