I want to filter out the input JSON based on two field values of input JSON.
Input JSON
[
{
"from_Store": "Test1",
"to_Store": "Test1",
"items": [
{
"UPC": "8240959370255",
"shippedQuantity": 1
}
]
},
{
"from_Store": "Test2",
"to_Store": "Test3",
"items": [
{
"UPC": "8240959370210",
"shippedQuantity": 1
}
]
}
]
- If the values of the from_Store and to_Store do not match, then keep that complete element of the map in the output JSON.
- If the values match, then the entire element should not be in the output
Expected output JSON
[
{
"from_Store": "Test2",
"to_Store": "Test3",
"items": [
{
"UPC": "8240959370210",
"shippedQuantity": 1
}
]
}
]
Is there any function to compare the strings in Jolt?
Any help would be appreciated!