Forum Discussion

srini_polimera's avatar
srini_polimera
New Contributor III
3 years ago
Solved

Json object

I need help to get below output.

[
{
“key1”:“value1”,
“key2”:“value2”
},
{

“key3”:“value3”,
“key4”:“value4”
}
]

expected result
{
item”:
[
{
“key1”:“value1”,
“key2”:“value2”
},
{

“key3”:“value3”,
“key4”:“value4”
}
]
}

Thanks for your help.

  • j_angelevski's avatar
    j_angelevski
    4 years ago

    Since they are separate objects, you have to find a way to combine them into one.
    Instead of Union, you can use Join with the following configuration:


    This will merge both objects into one, then you can easily check if countbefore is equal to countafter with the Filter: $['$countbefore'] == $['$countafter']

    Or, you can use an inner Join instead of the combination with Join + Filter:

    If their values are the same, there will be an output.

2 Replies

  • Hi @srini.polimera,

    You can try by using the Group By N Snap with Group Size set to 0 and Target Field set to item.

    Let me know if this works for you.

    BR,
    Aleksandar.